Class ApplicationEventImpl

java.lang.Object
org.glassfish.jersey.server.internal.monitoring.ApplicationEventImpl
All Implemented Interfaces:
ApplicationEvent

public class ApplicationEventImpl extends Object implements ApplicationEvent
Implementation of application event. Instances are immutable.
Author:
Miroslav Fuksa
  • Constructor Details

    • ApplicationEventImpl

      public ApplicationEventImpl(ApplicationEvent.Type type, ResourceConfig resourceConfig, Set<Class<?>> providers, Set<Class<?>> registeredClasses, Set<Object> registeredInstances, ResourceModel resourceModel)
      Create a new application event.
      Parameters:
      type - Type of the event.
      resourceConfig - Resource config of the application.
      registeredClasses - Registered resource classes.
      registeredInstances - Registered resource instances.
      resourceModel - Resource model of the application (enhanced by model processors).
      providers - Registered providers.
  • Method Details

    • getResourceConfig

      public ResourceConfig getResourceConfig()
      Description copied from interface: ApplicationEvent
      Get resource config associated with the application. The resource config is set for all event types.
      Specified by:
      getResourceConfig in interface ApplicationEvent
      Returns:
      Resource config on which this application is based on.
    • getType

      public ApplicationEvent.Type getType()
      Description copied from interface: ApplicationEvent
      Return the type of the event.
      Specified by:
      getType in interface ApplicationEvent
      Returns:
      Event type.
    • getRegisteredClasses

      public Set<Class<?>> getRegisteredClasses()
      Description copied from interface: ApplicationEvent
      Get resource classes registered by the user in the current application. The set contains only user resource classes and not resource classes added by Jersey or by ModelProcessor.

      User resources are resources that were explicitly registered by the configuration, discovered by the class path scanning or that constructs explicitly registered programmatic resource.

      Specified by:
      getRegisteredClasses in interface ApplicationEvent
      Returns:
      Resource user registered classes.
    • getRegisteredInstances

      public Set<Object> getRegisteredInstances()
      Description copied from interface: ApplicationEvent
      Get resource instances registered by the user in the current application. The set contains only user resources and not resources added by Jersey or by ModelProcessor.

      User resources are resources that were explicitly registered by the configuration, discovered by the class path scanning or that constructs explicitly registered programmatic resource.

      Specified by:
      getRegisteredInstances in interface ApplicationEvent
      Returns:
      Resource instances registered by user.
    • getProviders

      public Set<Class<?>> getProviders()
      Description copied from interface: ApplicationEvent
      Get registered providers available in the runtime. The registered providers are providers like filters, reader and writer interceptors which are explicitly registered by configuration, or annotated by @Provider or registered in META-INF/services. The set does not include providers that are by default built in Jersey.
      Specified by:
      getProviders in interface ApplicationEvent
      Returns:
      Set of provider classes.
    • getResourceModel

      public ResourceModel getResourceModel()
      Description copied from interface: ApplicationEvent
      Get the resource model of the application. The method returns null for ApplicationEvent.Type.INITIALIZATION_START event type as the resource model is not initialized yet. The returned resource model is the final deployed model including resources enhanced by model processors.
      Specified by:
      getResourceModel in interface ApplicationEvent
      Returns:
      Resource model of the deployed application.