Class ApplicationEventImpl
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.ApplicationEventImpl
-
- All Implemented Interfaces:
ApplicationEvent
public class ApplicationEventImpl extends Object implements ApplicationEvent
Implementation ofapplication 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
Constructors Constructor Description ApplicationEventImpl(ApplicationEvent.Type type, ResourceConfig resourceConfig, Set<Class<?>> providers, Set<Class<?>> registeredClasses, Set<Object> registeredInstances, ResourceModel resourceModel)Create a new application event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Class<?>>getProviders()Get registered providers available in the runtime.Set<Class<?>>getRegisteredClasses()Get resource classes registered by the user in the current application.Set<Object>getRegisteredInstances()Get resource instances registered by the user in the current application.ResourceConfiggetResourceConfig()Get resource config associated with the application.ResourceModelgetResourceModel()Get the resource model of the application.ApplicationEvent.TypegetType()Return the type of the event.
-
-
-
Constructor Detail
-
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 Detail
-
getResourceConfig
public ResourceConfig getResourceConfig()
Description copied from interface:ApplicationEventGet resource config associated with the application. The resource config is set for all event types.- Specified by:
getResourceConfigin interfaceApplicationEvent- Returns:
- Resource config on which this application is based on.
-
getType
public ApplicationEvent.Type getType()
Description copied from interface:ApplicationEventReturn the type of the event.- Specified by:
getTypein interfaceApplicationEvent- Returns:
- Event type.
-
getRegisteredClasses
public Set<Class<?>> getRegisteredClasses()
Description copied from interface:ApplicationEventGet 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:
getRegisteredClassesin interfaceApplicationEvent- Returns:
- Resource user registered classes.
-
getRegisteredInstances
public Set<Object> getRegisteredInstances()
Description copied from interface:ApplicationEventGet 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:
getRegisteredInstancesin interfaceApplicationEvent- Returns:
- Resource instances registered by user.
-
getProviders
public Set<Class<?>> getProviders()
Description copied from interface:ApplicationEventGet registered providers available in the runtime. The registered providers are providers likefilters,readerandwriterinterceptors which are explicitly registered by configuration, or annotated by@Provideror registered in META-INF/services. The set does not include providers that are by default built in Jersey.- Specified by:
getProvidersin interfaceApplicationEvent- Returns:
- Set of provider classes.
-
getResourceModel
public ResourceModel getResourceModel()
Description copied from interface:ApplicationEventGet the resource model of the application. The method returns null forApplicationEvent.Type.INITIALIZATION_STARTevent 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:
getResourceModelin interfaceApplicationEvent- Returns:
- Resource model of the deployed application.
-
-