Codota Logo
AgentMessagesReceivedEvent.getAgentMessages
Code IndexAdd Codota to your IDE (free)

How to use
getAgentMessages
method
in
rocks.inspectit.agent.java.event.AgentMessagesReceivedEvent

Best Java code snippets using rocks.inspectit.agent.java.event.AgentMessagesReceivedEvent.getAgentMessages (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: inspectIT/inspectIT

/**
 * {@inheritDoc}
 */
@Override
public void onApplicationEvent(AgentMessagesReceivedEvent event) {
  if (event == null) {
    if (log.isDebugEnabled()) {
      log.debug("A 'null' event will not be processed.");
    }
    return;
  }
  // When we update to Spring v4, we should use @Conditional that the RetransformationManager
  // is not running if retransformation is not used.
  if (!Agent.agent.isUsingRetransformation()) {
    if (log.isInfoEnabled()) {
      log.info("Retransformation is disabled by the used retransformation strategy.");
    }
    return;
  }
  List<InstrumentationDefinition> instrumentationDefinitions = getInstrumentatioDefinitions(event.getAgentMessages());
  if (CollectionUtils.isEmpty(instrumentationDefinitions)) {
    return;
  }
  // remove out-dated duplicates
  Collection<InstrumentationDefinition> cleanedInstrumentationDefinitions = removeOutdatedInstrumentationDefinitions(instrumentationDefinitions);
  processInstrumentationDefinitions(cleanedInstrumentationDefinitions);
}
origin: inspectIT/inspectIT

@Test
public void successful() {
  Object eventSource = mock(Object.class);
  IAgentMessage<?> message = mock(IAgentMessage.class);
  List<IAgentMessage<?>> messages = Arrays.<IAgentMessage<?>> asList(message);
  AgentMessagesReceivedEvent event = new AgentMessagesReceivedEvent(eventSource, messages);
  assertThat(eventSource, is(equalTo(event.getSource())));
  assertThat(messages, is(equalTo(event.getAgentMessages())));
}
origin: inspectIT/inspectIT

@Test
public void successful() throws Exception {
  when(connection.isConnected()).thenReturn(true);
  when(platformManager.getPlatformId()).thenReturn(10L);
  List<IAgentMessage<?>> messages = Arrays.<IAgentMessage<?>> asList(mock(IAgentMessage.class));
  when(connection.fetchAgentMessages(10L)).thenReturn(messages);
  messageFetcher.run();
  verify(connection).isConnected();
  verify(connection).fetchAgentMessages(10L);
  verify(platformManager).getPlatformId();
  ArgumentCaptor<AgentMessagesReceivedEvent> eventCaptor = ArgumentCaptor.forClass(AgentMessagesReceivedEvent.class);
  verify(eventPublisher).publishEvent(eventCaptor.capture());
  verifyNoMoreInteractions(connection, eventPublisher, platformManager);
  assertThat(eventCaptor.getValue().getAgentMessages(), is(equalTo(messages)));
}
rocks.inspectit.agent.java.eventAgentMessagesReceivedEventgetAgentMessages

Javadoc

Gets #agentMessages.

Popular methods of AgentMessagesReceivedEvent

  • <init>
    Default constructor for the event.
  • getSource

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
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