org.glassfish.jersey.server.monitoring.ApplicationEvent Java Examples

The following examples show how to use org.glassfish.jersey.server.monitoring.ApplicationEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SFRestApiListener.java    From sailfish-core with Apache License 2.0 6 votes vote down vote up
@Override
public void onEvent(ApplicationEvent applicationEvent) {
    switch (applicationEvent.getType()) {
        case INITIALIZATION_FINISHED:
            logger.info("Jersey application started.");
            break;
        case INITIALIZATION_START:
        	logger.info("Jersey INITIALIZATION_START");
        	break;
        case DESTROY_FINISHED:
        	logger.info("Jersey DESTROY_FINISHED");
        	break;
        case RELOAD_FINISHED:
        	logger.info("Jersey RELOAD_FINISHED");
        	break;
        case INITIALIZATION_APP_FINISHED:
            logger.info("Jersey INITIALIZATION_APP_FINISHED");
            break;
        default:
            break;
    }
}
 
Example #2
Source File: LifecycleDiagnostic.java    From dropwizard-guicey with MIT License 6 votes vote down vote up
@Override
@SuppressWarnings({"checkstyle:MissingSwitchDefault", "PMD.SwitchStmtsShouldHaveDefault"})
@SuppressFBWarnings("SF_SWITCH_NO_DEFAULT")
public void onEvent(final ApplicationEvent event) {
    switch (event.getType()) {
        case INITIALIZATION_START:
            log("Initializing jersey app...");
            break;
        case INITIALIZATION_APP_FINISHED:
            log("Jersey app initialized");
            break;
        case INITIALIZATION_FINISHED:
            log("Jersey initialized");
            break;
        case DESTROY_FINISHED:
            log("Jersey app destroyed");
            break;
    }
}
 
Example #3
Source File: SpanCustomizingApplicationEventListenerTest.java    From wingtips with Apache License 2.0 5 votes vote down vote up
@Test
public void onEvent_for_ApplicationEvent_does_nothing() {
    // given
    ApplicationEvent eventMock = mock(ApplicationEvent.class);

    // when
    implSpy.onEvent(eventMock);

    // then
    verify(implSpy).onEvent(eventMock);
    verifyNoMoreInteractions(implSpy);
    verifyZeroInteractions(eventMock);
}
 
Example #4
Source File: App.java    From jweb-cms with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public void onEvent(ApplicationEvent event) {
}
 
Example #5
Source File: MetricsApplicationEventListener.java    From micrometer with Apache License 2.0 4 votes vote down vote up
@Override
public void onEvent(ApplicationEvent event) {
}
 
Example #6
Source File: TimingApplicationEventListener.java    From dremio-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void onEvent(ApplicationEvent event) {
  logger.info("ApplicationEventListener.onEvent " + event.getType());
}
 
Example #7
Source File: SpanCustomizingApplicationEventListener.java    From wingtips with Apache License 2.0 4 votes vote down vote up
@Override
public void onEvent(ApplicationEvent event) {
    // Only onRequest is used.
}
 
Example #8
Source File: TransactionEventListener.java    From registry with Apache License 2.0 4 votes vote down vote up
@Override
public void onEvent(ApplicationEvent applicationEvent) {
}
 
Example #9
Source File: OpenCensusApplicationEventListener.java    From heroic with Apache License 2.0 4 votes vote down vote up
@Override
public void onEvent(ApplicationEvent event) {
    // we don't care about the server lifecycle
}
 
Example #10
Source File: Application.java    From ameba with MIT License 4 votes vote down vote up
@Override
public void onEvent(ApplicationEvent event) {
    SystemEventBus.publish(new ameba.core.event.ApplicationEvent(event));
}
 
Example #11
Source File: ExceptionLogger.java    From jqm with Apache License 2.0 4 votes vote down vote up
@Override
public void onEvent(final ApplicationEvent applicationEvent)
{}
 
Example #12
Source File: JerseyApplicationEventListener.java    From minnal with Apache License 2.0 4 votes vote down vote up
@Override
public void onEvent(ApplicationEvent event) {
}
 
Example #13
Source File: SpanCustomizingApplicationEventListener.java    From brave with Apache License 2.0 4 votes vote down vote up
@Override public void onEvent(ApplicationEvent event) {
  // only onRequest is used
}
 
Example #14
Source File: TracingApplicationEventListener.java    From brave with Apache License 2.0 4 votes vote down vote up
@Override public void onEvent(ApplicationEvent event) {
  // only onRequest is used
}
 
Example #15
Source File: JerseyEventListener.java    From metrics with Apache License 2.0 2 votes vote down vote up
@Override
public void onEvent(ApplicationEvent event) {

}