Class ApplicationInfoImpl

java.lang.Object
org.glassfish.jersey.server.internal.monitoring.ApplicationInfoImpl
All Implemented Interfaces:
ApplicationInfo

final class ApplicationInfoImpl extends Object implements ApplicationInfo
Application statistics.
  • Field Details

    • resourceConfig

      private final ResourceConfig resourceConfig
    • startTime

      private final Date startTime
    • registeredClasses

      private final Set<Class<?>> registeredClasses
    • registeredInstances

      private final Set<Object> registeredInstances
    • providers

      private final Set<Class<?>> 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

      public ResourceConfig getResourceConfig()
      Description copied from interface: ApplicationInfo
      Get the resource config.
      Specified by:
      getResourceConfig in interface ApplicationInfo
      Returns:
      Resource config.
    • getStartTime

      public Date getStartTime()
      Description copied from interface: ApplicationInfo
      Get the start time of the application.
      Specified by:
      getStartTime in interface ApplicationInfo
      Returns:
      Time when an application initialization has been finished.
    • getRegisteredClasses

      public Set<Class<?>> 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 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 ApplicationInfo
      Returns:
      Resource user registered classes.
    • getRegisteredInstances

      public Set<Object> 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 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 ApplicationInfo
      Returns:
      Resource instances registered by user.
    • getProviders

      public Set<Class<?>> getProviders()
      Description copied from interface: ApplicationInfo
      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 ApplicationInfo
      Returns:
      Set of provider classes.
    • snapshot

      public ApplicationInfo 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 interface ApplicationInfo
      Returns:
      Snapshot of application info.