Class ApplicationEventImpl
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.ApplicationEventImpl
- All Implemented Interfaces:
ApplicationEvent
Implementation of
application event
. Instances are immutable.- Author:
- Miroslav Fuksa
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glassfish.jersey.server.monitoring.ApplicationEvent
ApplicationEvent.Type
-
Constructor Summary
ConstructorDescriptionApplicationEventImpl
(ApplicationEvent.Type type, ResourceConfig resourceConfig, Set<Class<?>> providers, Set<Class<?>> registeredClasses, Set<Object> registeredInstances, ResourceModel resourceModel) Create a new application event. -
Method Summary
Modifier and TypeMethodDescriptionGet registered providers available in the runtime.Get resource classes registered by the user in the current application.Get resource instances registered by the user in the current application.Get resource config associated with the application.Get the resource model of the application.getType()
Return the type of the event.
-
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 bymodel processors
).providers
- Registered providers.
-
-
Method Details
-
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 interfaceApplicationEvent
- Returns:
- Resource config on which this application is based on.
-
getType
Description copied from interface:ApplicationEvent
Return the type of the event.- Specified by:
getType
in interfaceApplicationEvent
- Returns:
- Event type.
-
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 byModelProcessor
. User resources are resources that were explicitly registered by the configuration, discovered by the class path scanning or that constructs explicitly registeredprogrammatic resource
.- Specified by:
getRegisteredClasses
in interfaceApplicationEvent
- Returns:
- Resource user registered classes.
-
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 byModelProcessor
. User resources are resources that were explicitly registered by the configuration, discovered by the class path scanning or that constructs explicitly registeredprogrammatic resource
.- Specified by:
getRegisteredInstances
in interfaceApplicationEvent
- Returns:
- Resource instances registered by user.
-
getProviders
Description copied from interface:ApplicationEvent
Get registered providers available in the runtime. The registered providers are providers likefilters
,reader
andwriter
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 interfaceApplicationEvent
- Returns:
- Set of provider classes.
-
getResourceModel
Description copied from interface:ApplicationEvent
Get the resource model of the application. The method returns null forApplicationEvent.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 bymodel processors
.- Specified by:
getResourceModel
in interfaceApplicationEvent
- Returns:
- Resource model of the deployed application.
-