Class ApplicationEventImpl

    • Field Detail

      • providers

        private final java.util.Set<java.lang.Class<?>> providers
      • registeredClasses

        private final java.util.Set<java.lang.Class<?>> registeredClasses
      • registeredInstances

        private final java.util.Set<java.lang.Object> registeredInstances
    • Constructor Detail

      • ApplicationEventImpl

        public ApplicationEventImpl​(ApplicationEvent.Type type,
                                    ResourceConfig resourceConfig,
                                    java.util.Set<java.lang.Class<?>> providers,
                                    java.util.Set<java.lang.Class<?>> registeredClasses,
                                    java.util.Set<java.lang.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 by model processors).
        providers - Registered providers.
    • Method Detail

      • getResourceConfig

        public ResourceConfig 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 interface ApplicationEvent
        Returns:
        Resource config on which this application is based on.
      • getRegisteredClasses

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

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

        public java.util.Set<java.lang.Class<?>> getProviders()
        Description copied from interface: ApplicationEvent
        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 ApplicationEvent
        Returns:
        Set of provider classes.