Class ResourceMethodConfig

  • All Implemented Interfaces:
    javax.ws.rs.core.Configurable<javax.ws.rs.core.FeatureContext>, javax.ws.rs.core.Configuration, javax.ws.rs.core.FeatureContext, ExtendedConfig

    class ResourceMethodConfig
    extends CommonConfig
    Default configuration for resource methods. The only allowed contract types for this configuration are:
    • ContainerRequestFilter
    • ContainerResponseFilter
    • ReaderInterceptor
    • WriterInterceptor
    • Field Detail

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • allowedContracts

        private static final java.util.Set<java.lang.Class<?>> allowedContracts
    • Constructor Detail

      • ResourceMethodConfig

        ResourceMethodConfig​(java.util.Map<java.lang.String,​java.lang.Object> properties)
        Create new resource method runtime configuration.
        Parameters:
        properties - inherited properties.
    • Method Detail

      • getModelEnhancer

        protected Inflector<ContractProvider.Builder,​ContractProvider> getModelEnhancer​(java.lang.Class<?> providerClass)
        Description copied from class: CommonConfig
        An extension point that provides a way how to define a custom enhancement/update operation of a contract provider model registration being produced for a given component class. Default implementation return an enhancer just builds the model.

        Derived implementations may use this method to e.g. filter out all contracts not applicable in the given configuration context or change the model scope. The returned set of filtered contracts is then used for the actual provider registration.

        Overrides:
        getModelEnhancer in class CommonConfig
        Parameters:
        providerClass - class of the component being registered.
        Returns:
        filter for the contracts that being registered for a given component class.