Codota Logo
IAgentService.fetchAgentMessages
Code IndexAdd Codota to your IDE (free)

How to use
fetchAgentMessages
method
in
rocks.inspectit.shared.all.cmr.service.IAgentService

Best Java code snippets using rocks.inspectit.shared.all.cmr.service.IAgentService.fetchAgentMessages (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

  @Override
  protected List<IAgentMessage<?>> performRemoteCall(IAgentService service) throws Exception {
    return agentService.fetchAgentMessages(platformIdent);
  }
};
origin: inspectIT/inspectIT

@Test
public void fetchAgentMessages() throws Exception {
  IAgentMessage<?> message = mock(IAgentMessage.class);
  List<IAgentMessage<?>> messages = Arrays.<IAgentMessage<?>> asList(message);
  when(client.isConnected()).thenReturn(true);
  long id = 7;
  when(agentService.fetchAgentMessages(id)).thenReturn(messages);
  List<IAgentMessage<?>> result = connection.fetchAgentMessages(id);
  assertThat(result, is(equalTo(messages)));
  verify(agentService).fetchAgentMessages(id);
  verifyNoMoreInteractions(agentService);
}
origin: inspectIT/inspectIT

@Test(expectedExceptions = { ServerUnavailableException.class })
public void timeout() throws Exception {
  when(client.isConnected()).thenReturn(true);
  long id = 7;
  when(agentService.fetchAgentMessages(id)).thenThrow(TimeoutException.class);
  try {
    connection.fetchAgentMessages(id);
  } catch (ServerUnavailableException e) {
    assertThat(e.isServerTimeout(), is(true));
    throw e;
  } finally {
    verify(agentService).fetchAgentMessages(id);
    verifyNoMoreInteractions(agentService);
  }
}
origin: inspectIT/inspectIT

@Test(expectedExceptions = { ServerUnavailableException.class })
public void remoteException() throws Exception {
  when(client.isConnected()).thenReturn(true);
  long id = 7;
  when(agentService.fetchAgentMessages(id)).thenThrow(RuntimeException.class);
  try {
    connection.fetchAgentMessages(id);
  } catch (ServerUnavailableException e) {
    assertThat(e.isServerTimeout(), is(false));
    throw e;
  } finally {
    // fail fast call, only one attempt
    verify(agentService).fetchAgentMessages(id);
    verifyNoMoreInteractions(agentService);
    verify(client).close();
  }
}
rocks.inspectit.shared.all.cmr.serviceIAgentServicefetchAgentMessages

Javadoc

Fetches all IAgentMessage which are available at the CMR. The returned list is an ordered list, ordered by time (ascending -> index 0 is the oldest).

Popular methods of IAgentService

  • analyze
    Analyzes the given type and adds instrumentation points if necessary, returning the instrumentation
  • analyzeJmxAttributes
    Analyzes the given JmxAttributeDescriptor and decides which ones will be monitored, based on the cur
  • instrumentationApplied
    Informs the CMR that the methods have been instrumented on the agent.
  • register
    Registers the agent with the CMR. The CMR will answer with the AgentConfig containing all necessary
  • unregister
    Unregisters the platform in the CMR by sending the agent id.

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • setContentView (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Notification (javax.management)
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now