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:ApplicationInfoGet the resource config.- Specified by:
getResourceConfigin interfaceApplicationInfo- Returns:
- Resource config.
-
getStartTime
Description copied from interface:ApplicationInfoGet the start time of the application.- Specified by:
getStartTimein interfaceApplicationInfo- Returns:
- Time when an application initialization has been finished.
-
getRegisteredClasses
Description copied from interface:ApplicationInfoGet 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 interfaceApplicationInfo- Returns:
- Resource user registered classes.
-
getRegisteredInstances
Description copied from interface:ApplicationInfoGet 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 interfaceApplicationInfo- Returns:
- Resource instances registered by user.
-
getProviders
Description copied from interface:ApplicationInfoGet 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 interfaceApplicationInfo- Returns:
- Set of provider classes.
-
snapshot
Description copied from interface:ApplicationInfoGet 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:
snapshotin interfaceApplicationInfo- Returns:
- Snapshot of application info.
-