Class ApplicationInfoImpl
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.ApplicationInfoImpl
- All Implemented Interfaces:
ApplicationInfo
Application statistics.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionApplicationInfoImpl
(ResourceConfig resourceConfig, Date startTime, Set<Class<?>> registeredClasses, Set<Object> registeredInstances, Set<Class<?>> providers) Create a new application statistics instance. -
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 the resource config.Get the start time of the application.snapshot()
Get the immutable consistent snapshot of the application info.
-
Field Details
-
resourceConfig
-
startTime
-
registeredClasses
-
registeredInstances
-
providers
-
-
Constructor Details
-
ApplicationInfoImpl
ApplicationInfoImpl(ResourceConfig resourceConfig, Date startTime, Set<Class<?>> registeredClasses, Set<Object> registeredInstances, Set<Class<?>> providers) Create a new application statistics instance.- Parameters:
resourceConfig
- Resource config of the application being monitored.startTime
- Start time of the application (when initialization was finished).registeredClasses
- Registered resource classes.registeredInstances
- Registered resource instances.providers
- Registered providers.
-
-
Method Details
-
getResourceConfig
Description copied from interface:ApplicationInfo
Get the resource config.- Specified by:
getResourceConfig
in interfaceApplicationInfo
- Returns:
- Resource config.
-
getStartTime
Description copied from interface:ApplicationInfo
Get the start time of the application.- Specified by:
getStartTime
in interfaceApplicationInfo
- Returns:
- Time when an application initialization has been finished.
-
getRegisteredClasses
Description copied from interface:ApplicationInfo
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 interfaceApplicationInfo
- Returns:
- Resource user registered classes.
-
getRegisteredInstances
Description copied from interface:ApplicationInfo
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 interfaceApplicationInfo
- Returns:
- Resource instances registered by user.
-
getProviders
Description copied from interface:ApplicationInfo
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 interfaceApplicationInfo
- Returns:
- Set of provider classes.
-
snapshot
Description copied from interface:ApplicationInfo
Get the immutable consistent snapshot of the application info. Working with snapshots might have negative performance impact as snapshot must be created but ensures consistency of data over time. However, the usage of snapshot is encouraged to avoid working with inconsistent data. Not all attributes must be updated in the same time on mutable version of info.- Specified by:
snapshot
in interfaceApplicationInfo
- Returns:
- Snapshot of application info.
-