Class ResteasyProviderFactoryDelegate

java.lang.Object
jakarta.ws.rs.ext.RuntimeDelegate
org.jboss.resteasy.spi.ResteasyProviderFactory
org.jboss.resteasy.core.providerfactory.ResteasyProviderFactoryDelegate
All Implemented Interfaces:
Configurable<ResteasyProviderFactory>, Configuration, Providers, HeaderValueProcessor

public class ResteasyProviderFactoryDelegate extends ResteasyProviderFactory
A ResteasyProviderFactoryDelegate.
Author:
Nicolas NESMON
  • Constructor Details

    • ResteasyProviderFactoryDelegate

      public ResteasyProviderFactoryDelegate(ResteasyProviderFactory resteasyProviderFactoryDelegator)
  • Method Details

    • getMessageBodyReader

      public <T> MessageBodyReader<T> getMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType)
      Description copied from interface: Providers
      Get a message body reader that matches a set of criteria. The set of readers is first filtered by comparing the supplied value of mediaType with the value of each reader's Consumes, ensuring the supplied value of type is assignable to the generic type of the reader, and eliminating those that do not match. The list of matching readers is then ordered with those with the best matching values of Consumes (x/y > x/* > */*) sorted first. Finally, the MessageBodyReader.isReadable(Class, Type, Annotation[], MediaType) method is called on each reader in order using the supplied criteria and the first reader that returns true is selected and returned.
      Type Parameters:
      T - type of the the object that is to be read.
      Parameters:
      type - the class of the object that is to be read.
      genericType - the type of object to be produced. E.g. if the message body is to be converted into a method parameter, this will be the formal type of the method parameter as returned by Class.getGenericParameterTypes.
      annotations - an array of the annotations on the declaration of the artifact that will be initialized with the produced instance. E.g. if the message body is to be converted into a method parameter, this will be the annotations on that parameter returned by Class.getParameterAnnotations.
      mediaType - the media type of the data that will be read.
      Returns:
      a MessageBodyReader that matches the supplied criteria or null if none is found.
    • getMessageBodyWriter

      public <T> MessageBodyWriter<T> getMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType)
      Description copied from interface: Providers
      Get a message body writer that matches a set of criteria. The set of writers is first filtered by comparing the supplied value of mediaType with the value of each writer's Produces, ensuring the supplied value of type is assignable to the generic type of the reader, and eliminating those that do not match. The list of matching writers is then ordered with those with the best matching values of Produces (x/y > x/* > */*) sorted first. Finally, the MessageBodyWriter.isWriteable(Class, Type, Annotation[], MediaType) method is called on each writer in order using the supplied criteria and the first writer that returns true is selected and returned.
      Type Parameters:
      T - type of the object that is to be written.
      Parameters:
      type - the class of the object that is to be written.
      genericType - the type of object to be written. E.g. if the message body is to be produced from a field, this will be the declared type of the field as returned by Field.getGenericType.
      annotations - an array of the annotations on the declaration of the artifact that will be written. E.g. if the message body is to be produced from a field, this will be the annotations on that field returned by Field.getDeclaredAnnotations.
      mediaType - the media type of the data that will be written.
      Returns:
      a MessageBodyReader that matches the supplied criteria or null if none is found.
    • getExceptionMapper

      public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> type)
      Description copied from interface: Providers
      Get an exception mapping provider for a particular class of exception. Returns the provider whose generic type is the nearest superclass of type.
      Type Parameters:
      T - type of the exception handled by the exception mapping provider.
      Parameters:
      type - the class of exception.
      Returns:
      an ExceptionMapper for the supplied type or null if none is found.
    • getContextResolver

      public <T> ContextResolver<T> getContextResolver(Class<T> contextType, MediaType mediaType)
      Description copied from interface: Providers
      Get a context resolver for a particular type of context and media type. The set of resolvers is first filtered by comparing the supplied value of mediaType with the value of each resolver's Produces, ensuring the generic type of the context resolver is assignable to the supplied value of contextType, and eliminating those that do not match. If only one resolver matches the criteria then it is returned. If more than one resolver matches then the list of matching resolvers is ordered with those with the best matching values of Produces (x/y > x/* > */*) sorted first. A proxy is returned that delegates calls to ContextResolver.getContext(java.lang.Class) to each matching context resolver in order and returns the first non-null value it obtains or null if all matching context resolvers return null.
      Type Parameters:
      T - type of the context.
      Parameters:
      contextType - the class of context desired.
      mediaType - the media type of data for which a context is required.
      Returns:
      a matching context resolver instance or null if no matching context providers are found.
    • toHeaderString

      public String toHeaderString(Object object)
      Description copied from interface: HeaderValueProcessor
      Convert an object to a header string. First try StringConverter, then HeaderDelegate, then object.toString().
      Parameters:
      object - header object
      Returns:
      header string representation
    • getConfiguration

      public Configuration getConfiguration()
      Description copied from interface: Configurable
      Get a live view of an internal configuration state of this configurable instance. Any changes made using methods of this Configurable instance will be reflected in the returned Configuration instance.

      The returned Configuration instance and the collection data it provides are not thread-safe wrt. modification made using methods on the parent configurable object.

      Returns:
      configuration live view of the internal configuration state.
    • property

      public ResteasyProviderFactory property(String name, Object value)
      Description copied from interface: Configurable
      Set the new configuration property, if already set, the existing value of the property will be updated. Setting a null value into a property effectively removes the property from the property bag.
      Parameters:
      name - property name.
      value - (new) property value. null value removes the property with the given name.
      Returns:
      the updated configurable instance.
    • register

      public ResteasyProviderFactory register(Class<?> componentClass)
      Description copied from interface: Configurable
      Register a class of a custom JAX-RS component (such as an extension provider or a feature meta-provider) to be instantiated and used in the scope of this configurable context. Implementations SHOULD warn about and ignore registrations that do not conform to the requirements of supported JAX-RS component types in the given configurable context. Any subsequent registration attempts for a component type, for which a class or instance-based registration already exists in the system MUST be rejected by the JAX-RS implementation and a warning SHOULD be raised to inform the user about the rejected registration. The registered JAX-RS component class is registered as a contract provider of all the recognized JAX-RS or implementation-specific extension contracts including meta-provider contracts, such as Feature or DynamicFeature.

      As opposed to component instances registered via Configurable.register(Object) method, the lifecycle of components registered using this class-based register(...) method is fully managed by the JAX-RS implementation or any underlying IoC container supported by the implementation.

      Parameters:
      componentClass - JAX-RS component class to be configured in the scope of this configurable context.
      Returns:
      the updated configurable context.
    • register

      public ResteasyProviderFactory register(Class<?> componentClass, int priority)
      Description copied from interface: Configurable
      Register a class of a custom JAX-RS component (such as an extension provider or a feature meta-provider) to be instantiated and used in the scope of this configurable context.

      This registration method provides the same functionality as Configurable.register(Class) except that any priority specified on the registered JAX-RS component class via jakarta.annotation.Priority annotation is overridden with the supplied priority value.

      Note that in case the priority is not applicable to a particular provider contract implemented by the class of the registered component, the supplied priority value will be ignored for that contract.

      Parameters:
      componentClass - JAX-RS component class to be configured in the scope of this configurable context.
      priority - the overriding priority for the registered component and all the provider contracts the component implements.
      Returns:
      the updated configurable context.
    • register

      public ResteasyProviderFactory register(Class<?> componentClass, Class<?>... contracts)
      Description copied from interface: Configurable
      Register a class of a custom JAX-RS component (such as an extension provider or a feature meta-provider) to be instantiated and used in the scope of this configurable context.

      This registration method provides the same functionality as Configurable.register(Class) except the JAX-RS component class is only registered as a provider of the listed extension provider or meta-provider contracts. All explicitly enumerated contract types must represent a class or an interface implemented or extended by the registered component. Contracts that are not assignable from the registered component class MUST be ignored and implementations SHOULD raise a warning to inform users about the ignored contract(s).

      Parameters:
      componentClass - JAX-RS component class to be configured in the scope of this configurable context.
      contracts - the specific extension provider or meta-provider contracts implemented by the component for which the component should be registered. Implementations MUST ignore attempts to register a component class for an empty or null collection of contracts via this method and SHOULD raise a warning about such event.
      Returns:
      the updated configurable context.
    • register

      public ResteasyProviderFactory register(Class<?> componentClass, Map<Class<?>,Integer> contracts)
      Description copied from interface: Configurable
      Register a class of a custom JAX-RS component (such as an extension provider or a feature meta-provider) to be instantiated and used in the scope of this configurable context.

      This registration method provides same functionality as Configurable.register(Class, Class[]) except that any priority specified on the registered JAX-RS component class via jakarta.annotation.Priority annotation is overridden for each extension provider contract type separately with an integer priority value specified as a value in the supplied map of [contract type, priority] pairs.

      Note that in case a priority is not applicable to a provider contract registered for the JAX-RS component, the supplied priority value is ignored for such contract.

      Parameters:
      componentClass - JAX-RS component class to be configured in the scope of this configurable context.
      contracts - map of the specific extension provider and meta-provider contracts and their associated priorities for which the JAX-RS component is registered. All contracts in the map must represent a class or an interface implemented or extended by the JAX-RS component. Contracts that are not assignable from the registered component class MUST be ignored and implementations SHOULD raise a warning to inform users about the ignored contract(s).
      Returns:
      the updated configurable context.
    • register

      public ResteasyProviderFactory register(Object component)
      Description copied from interface: Configurable
      Register an instance of a custom JAX-RS component (such as an extension provider or a feature meta-provider) to be instantiated and used in the scope of this configurable context. Implementations SHOULD warn about and ignore registrations that do not conform to the requirements of supported JAX-RS component types in the given configurable context. Any subsequent registration attempts for a component type, for which a class or instance-based registration already exists in the system MUST be rejected by the JAX-RS implementation and a warning SHOULD be raised to inform the user about the rejected registration. The registered JAX-RS component is registered as a contract provider of all the recognized JAX-RS or implementation-specific extension contracts including meta-provider contracts, such as Feature or DynamicFeature.

      As opposed to components registered via Configurable.register(Class) method, the lifecycle of providers registered using this instance-based register(...) is not managed by JAX-RS runtime. The same registered component instance is used during the whole lifespan of the configurable context. Fields and properties of all registered JAX-RS component instances are injected with their declared dependencies (see Context) by the JAX-RS runtime prior to use.

      Parameters:
      component - JAX-RS component instance to be configured in the scope of this configurable context.
      Returns:
      the updated configurable context.
    • register

      public ResteasyProviderFactory register(Object component, int priority)
      Description copied from interface: Configurable
      Register an instance of a custom JAX-RS component (such as an extension provider or a feature meta-provider) to be instantiated and used in the scope of this configurable context.

      This registration method provides the same functionality as Configurable.register(Object) except that any priority specified on the registered JAX-RS component class via jakarta.annotation.Priority annotation is overridden with the supplied priority value.

      Note that in case the priority is not applicable to a particular provider contract implemented by the class of the registered component, the supplied priority value will be ignored for that contract.

      Parameters:
      component - JAX-RS component instance to be configured in the scope of this configurable context.
      priority - the overriding priority for the registered component and all the provider contracts the component implements.
      Returns:
      the updated configurable context.
    • register

      public ResteasyProviderFactory register(Object component, Class<?>... contracts)
      Description copied from interface: Configurable
      Register an instance of a custom JAX-RS component (such as an extension provider or a feature meta-provider) to be instantiated and used in the scope of this configurable context.

      This registration method provides the same functionality as Configurable.register(Object) except the JAX-RS component class is only registered as a provider of the listed extension provider or meta-provider contracts. All explicitly enumerated contract types must represent a class or an interface implemented or extended by the registered component. Contracts that are not assignable from the registered component class MUST be ignored and implementations SHOULD raise a warning to inform users about the ignored contract(s).

      Parameters:
      component - JAX-RS component instance to be configured in the scope of this configurable context.
      contracts - the specific extension provider or meta-provider contracts implemented by the component for which the component should be registered. Implementations MUST ignore attempts to register a component class for an empty or null collection of contracts via this method and SHOULD raise a warning about such event.
      Returns:
      the updated configurable context.
    • register

      public ResteasyProviderFactory register(Object component, Map<Class<?>,Integer> contracts)
      Description copied from interface: Configurable
      Register an instance of a custom JAX-RS component (such as an extension provider or a feature meta-provider) to be instantiated and used in the scope of this configurable context.

      This registration method provides same functionality as Configurable.register(Object, Class[]) except that any priority specified on the registered JAX-RS component class via jakarta.annotation.Priority annotation is overridden for each extension provider contract type separately with an integer priority value specified as a value in the supplied map of [contract type, priority] pairs.

      Note that in case a priority is not applicable to a provider contract registered for the JAX-RS component, the supplied priority value is ignored for such contract.

      Parameters:
      component - JAX-RS component instance to be configured in the scope of this configurable context.
      contracts - map of the specific extension provider and meta-provider contracts and their associated priorities for which the JAX-RS component is registered. All contracts in the map must represent a class or an interface implemented or extended by the JAX-RS component. Contracts that are not assignable from the registered component class MUST be ignored and implementations SHOULD raise a warning to inform users about the ignored contract(s).
      Returns:
      the updated configurable context.
    • getRuntimeType

      public RuntimeType getRuntimeType()
      Description copied from interface: Configuration
      Get the runtime type of this configuration context.
      Returns:
      configuration context runtime type.
    • getProperties

      public Map<String,Object> getProperties()
      Description copied from interface: Configuration
      Get the immutable bag of configuration properties.
      Returns:
      the immutable view of configuration properties.
    • getProperty

      public Object getProperty(String name)
      Description copied from interface: Configuration
      Get the value for the property with a given name.
      Parameters:
      name - property name.
      Returns:
      the property value for the specified property name or null if the property with such name is not configured.
    • getPropertyNames

      public Collection<String> getPropertyNames()
      Description copied from interface: Configuration
      Returns an immutable collection containing the property names available within the context of the current configuration instance.

      Use the Configuration.getProperty(java.lang.String) method with a property name to get the value of a property.

      Returns:
      an immutable collection of property names.
      See Also:
    • isEnabled

      public boolean isEnabled(Feature feature)
      Description copied from interface: Configuration
      Check if a particular feature instance has been previously enabled in the runtime configuration context.

      Method returns true only in case an instance equal to the feature instance is already present among the features previously successfully enabled in the configuration context.

      Parameters:
      feature - a feature instance to test for.
      Returns:
      true if the feature instance has been previously enabled in this configuration context, false otherwise.
    • isEnabled

      public boolean isEnabled(Class<? extends Feature> featureClass)
      Description copied from interface: Configuration
      Check if a feature instance of featureClass class has been previously enabled in the runtime configuration context.

      Method returns true in case any instance of the featureClass class is already present among the features previously successfully enabled in the configuration context.

      Parameters:
      featureClass - a feature class to test for.
      Returns:
      true if a feature of a given class has been previously enabled in this configuration context, false otherwise.
    • isRegistered

      public boolean isRegistered(Object component)
      Description copied from interface: Configuration
      Check if a particular JAX-RS component instance (such as providers or features) has been previously registered in the runtime configuration context.

      Method returns true only in case an instance equal to the component instance is already present among the components previously registered in the configuration context.

      Parameters:
      component - a component instance to test for.
      Returns:
      true if the component instance has been previously registered in this configuration context, false otherwise.
      See Also:
    • isRegistered

      public boolean isRegistered(Class<?> componentClass)
      Description copied from interface: Configuration
      Check if a JAX-RS component of the supplied componentClass class has been previously registered in the runtime configuration context.

      Method returns true in case a component of the supplied componentClass class is already present among the previously registered component classes or instances in the configuration context.

      Parameters:
      componentClass - a component class to test for.
      Returns:
      true if a component of a given class has been previously registered in this configuration context, false otherwise.
      See Also:
    • getContracts

      public Map<Class<?>,Integer> getContracts(Class<?> componentClass)
      Description copied from interface: Configuration
      Get the extension contract registration information for a component of a given class. For component classes that are not configured in this configuration context the method returns an empty Map. Method does not return null.
      Parameters:
      componentClass - a component class for which to get contracts.
      Returns:
      map of extension contracts and their priorities for which the component class is registered. May return an empty map in case the component has not been registered for any extension contract supported by the implementation.
    • getClasses

      public Set<Class<?>> getClasses()
      Description copied from interface: Configuration
      Get the immutable set of registered JAX-RS component (such as provider, root resource or feature) classes to be instantiated, injected and utilized in the scope of the configurable instance. In contrast to Application.getClasses() this method returns a complete runtime view and therefore also includes auto-discovered components.

      For each component type, there can be only a single class-based or instance-based registration present in the configuration context at any given time.

      Returns:
      the immutable set of registered JAX-RS component classes. The returned value may be empty but will never be null.
      See Also:
    • getInstances

      public Set<Object> getInstances()
      Description copied from interface: Configuration
      Get the immutable set of registered JAX-RS component (such as provider or feature) instances to be utilized by the configurable instance. Fields and properties of returned instances are injected with their declared dependencies (see Context) by the runtime prior to use.

      For each component type, there can be only a single class-based or instance-based registration present in the configuration context at any given time.

      Returns:
      the immutable set of registered JAX-RS component instances. The returned value may be empty but will never be null.
      See Also:
    • getServerDynamicFeatures

      public Set<DynamicFeature> getServerDynamicFeatures()
      Specified by:
      getServerDynamicFeatures in class ResteasyProviderFactory
    • getClientDynamicFeatures

      public Set<DynamicFeature> getClientDynamicFeatures()
      Specified by:
      getClientDynamicFeatures in class ResteasyProviderFactory
    • getAsyncResponseProviders

      public Map<Class<?>,AsyncResponseProvider> getAsyncResponseProviders()
      Specified by:
      getAsyncResponseProviders in class ResteasyProviderFactory
    • getAsyncClientResponseProviders

      public Map<Class<?>,AsyncClientResponseProvider> getAsyncClientResponseProviders()
      Specified by:
      getAsyncClientResponseProviders in class ResteasyProviderFactory
    • getAsyncStreamProviders

      public Map<Class<?>,AsyncStreamProvider> getAsyncStreamProviders()
      Specified by:
      getAsyncStreamProviders in class ResteasyProviderFactory
    • getContextInjectors

      public Map<Type,ContextInjector> getContextInjectors()
      Specified by:
      getContextInjectors in class ResteasyProviderFactory
    • getAsyncContextInjectors

      public Map<Type,ContextInjector> getAsyncContextInjectors()
      Specified by:
      getAsyncContextInjectors in class ResteasyProviderFactory
    • getProviderClasses

      public Set<Class<?>> getProviderClasses()
      Specified by:
      getProviderClasses in class ResteasyProviderFactory
    • getProviderInstances

      public Set<Object> getProviderInstances()
      Specified by:
      getProviderInstances in class ResteasyProviderFactory
    • getContextData

      public <T> T getContextData(Class<T> type)
      Specified by:
      getContextData in class ResteasyProviderFactory
    • getContextData

      public <T> T getContextData(Class<T> rawType, Type genericType, Annotation[] annotations, boolean unwrapAsync)
      Specified by:
      getContextData in class ResteasyProviderFactory
    • registerBuiltin

      protected void registerBuiltin()
      Specified by:
      registerBuiltin in class ResteasyProviderFactory
    • isRegisterBuiltins

      public boolean isRegisterBuiltins()
      Specified by:
      isRegisterBuiltins in class ResteasyProviderFactory
    • setRegisterBuiltins

      public void setRegisterBuiltins(boolean registerBuiltins)
      Specified by:
      setRegisterBuiltins in class ResteasyProviderFactory
    • getInjectorFactory

      public InjectorFactory getInjectorFactory()
      Specified by:
      getInjectorFactory in class ResteasyProviderFactory
    • setInjectorFactory

      public void setInjectorFactory(InjectorFactory injectorFactory)
      Specified by:
      setInjectorFactory in class ResteasyProviderFactory
    • getServerReaderInterceptorRegistry

      public JaxrsInterceptorRegistry<ReaderInterceptor> getServerReaderInterceptorRegistry()
      Specified by:
      getServerReaderInterceptorRegistry in class ResteasyProviderFactory
    • getServerWriterInterceptorRegistry

      public JaxrsInterceptorRegistry<WriterInterceptor> getServerWriterInterceptorRegistry()
      Specified by:
      getServerWriterInterceptorRegistry in class ResteasyProviderFactory
    • getContainerRequestFilterRegistry

      public JaxrsInterceptorRegistry<ContainerRequestFilter> getContainerRequestFilterRegistry()
      Specified by:
      getContainerRequestFilterRegistry in class ResteasyProviderFactory
    • getContainerResponseFilterRegistry

      public JaxrsInterceptorRegistry<ContainerResponseFilter> getContainerResponseFilterRegistry()
      Specified by:
      getContainerResponseFilterRegistry in class ResteasyProviderFactory
    • getClientReaderInterceptorRegistry

      public JaxrsInterceptorRegistry<ReaderInterceptor> getClientReaderInterceptorRegistry()
      Specified by:
      getClientReaderInterceptorRegistry in class ResteasyProviderFactory
    • getClientWriterInterceptorRegistry

      public JaxrsInterceptorRegistry<WriterInterceptor> getClientWriterInterceptorRegistry()
      Specified by:
      getClientWriterInterceptorRegistry in class ResteasyProviderFactory
    • getClientRequestFilterRegistry

      public JaxrsInterceptorRegistry<ClientRequestFilter> getClientRequestFilterRegistry()
      Specified by:
      getClientRequestFilterRegistry in class ResteasyProviderFactory
    • getClientResponseFilters

      public JaxrsInterceptorRegistry<ClientResponseFilter> getClientResponseFilters()
      Specified by:
      getClientResponseFilters in class ResteasyProviderFactory
    • isBuiltinsRegistered

      public boolean isBuiltinsRegistered()
      Specified by:
      isBuiltinsRegistered in class ResteasyProviderFactory
    • setBuiltinsRegistered

      public void setBuiltinsRegistered(boolean builtinsRegistered)
      Specified by:
      setBuiltinsRegistered in class ResteasyProviderFactory
    • addHeaderDelegate

      public void addHeaderDelegate(Class clazz, RuntimeDelegate.HeaderDelegate header)
      Specified by:
      addHeaderDelegate in class ResteasyProviderFactory
    • getServerMessageBodyReader

      public <T> MessageBodyReader<T> getServerMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType)
      Specified by:
      getServerMessageBodyReader in class ResteasyProviderFactory
    • getClientMessageBodyReader

      public <T> MessageBodyReader<T> getClientMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType)
      Specified by:
      getClientMessageBodyReader in class ResteasyProviderFactory
    • getContextResolvers

      public List<ContextResolver> getContextResolvers(Class<?> clazz, MediaType type)
      Specified by:
      getContextResolvers in class ResteasyProviderFactory
    • getParamConverter

      public ParamConverter getParamConverter(Class clazz, Type genericType, Annotation[] annotations)
      Specified by:
      getParamConverter in class ResteasyProviderFactory
    • createStringParameterUnmarshaller

      public <T> StringParameterUnmarshaller<T> createStringParameterUnmarshaller(Class<T> clazz)
      Specified by:
      createStringParameterUnmarshaller in class ResteasyProviderFactory
    • registerProvider

      public void registerProvider(Class provider)
      Specified by:
      registerProvider in class ResteasyProviderFactory
    • toString

      public String toString(Object object, Class clazz, Type genericType, Annotation[] annotations)
      Description copied from class: ResteasyProviderFactory
      Convert an object to a string. First try StringConverter then, object.ToString()
      Specified by:
      toString in class ResteasyProviderFactory
      Parameters:
      object - object
      clazz - class
      genericType - generic type
      annotations - array of annotation
      Returns:
      string representation
    • getHeaderDelegate

      public RuntimeDelegate.HeaderDelegate getHeaderDelegate(Class<?> aClass)
      Description copied from class: ResteasyProviderFactory
      Checks to see if RuntimeDelegate is a ResteasyProviderFactory If it is, then use that, otherwise use this.
      Specified by:
      getHeaderDelegate in class ResteasyProviderFactory
      Parameters:
      aClass - class of the header
      Returns:
      header delegate
    • registerProvider

      public void registerProvider(Class provider, boolean isBuiltin)
      Description copied from class: ResteasyProviderFactory
      Register a @Provider class. Can be a MessageBodyReader/Writer or ExceptionMapper.
      Specified by:
      registerProvider in class ResteasyProviderFactory
      Parameters:
      provider - provider class
      isBuiltin - built-in
    • registerProvider

      public void registerProvider(Class provider, Integer priorityOverride, boolean isBuiltin, Map<Class<?>,Integer> contracts)
      Specified by:
      registerProvider in class ResteasyProviderFactory
    • registerProviderInstance

      public void registerProviderInstance(Object provider)
      Description copied from class: ResteasyProviderFactory
      Register a @Provider object. Can be a MessageBodyReader/Writer or ExceptionMapper.
      Specified by:
      registerProviderInstance in class ResteasyProviderFactory
      Parameters:
      provider - provider instance
    • registerProviderInstance

      public void registerProviderInstance(Object provider, Map<Class<?>,Integer> contracts, Integer priorityOverride, boolean builtIn)
      Specified by:
      registerProviderInstance in class ResteasyProviderFactory
    • getAsyncResponseProvider

      public <T> AsyncResponseProvider<T> getAsyncResponseProvider(Class<T> type)
      Specified by:
      getAsyncResponseProvider in class ResteasyProviderFactory
    • getAsyncClientResponseProvider

      public <T> AsyncClientResponseProvider<T> getAsyncClientResponseProvider(Class<T> type)
      Specified by:
      getAsyncClientResponseProvider in class ResteasyProviderFactory
    • getAsyncStreamProvider

      public <T> AsyncStreamProvider<T> getAsyncStreamProvider(Class<T> type)
      Specified by:
      getAsyncStreamProvider in class ResteasyProviderFactory
    • getConcreteMediaTypeFromMessageBodyWriters

      public MediaType getConcreteMediaTypeFromMessageBodyWriters(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
      Specified by:
      getConcreteMediaTypeFromMessageBodyWriters in class ResteasyProviderFactory
    • getPossibleMessageBodyWritersMap

      public Map<MessageBodyWriter<?>,Class<?>> getPossibleMessageBodyWritersMap(Class type, Type genericType, Annotation[] annotations, MediaType accept)
      Specified by:
      getPossibleMessageBodyWritersMap in class ResteasyProviderFactory
    • getServerMessageBodyWriter

      public <T> MessageBodyWriter<T> getServerMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType)
      Specified by:
      getServerMessageBodyWriter in class ResteasyProviderFactory
    • getClientMessageBodyWriter

      public <T> MessageBodyWriter<T> getClientMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType)
      Specified by:
      getClientMessageBodyWriter in class ResteasyProviderFactory
    • createProviderInstance

      public <T> T createProviderInstance(Class<? extends T> clazz)
      Description copied from class: ResteasyProviderFactory
      Create an instance of a class using provider allocation rules of the specification as well as the InjectorFactory only does constructor injection.
      Specified by:
      createProviderInstance in class ResteasyProviderFactory
      Type Parameters:
      T - type
      Parameters:
      clazz - class
      Returns:
      provider instance of type T
    • injectedInstance

      public <T> T injectedInstance(Class<? extends T> clazz)
      Description copied from class: ResteasyProviderFactory
      Property and constructor injection using the InjectorFactory.
      Specified by:
      injectedInstance in class ResteasyProviderFactory
      Type Parameters:
      T - type
      Parameters:
      clazz - class
      Returns:
      instance of type T
    • injectedInstance

      public <T> T injectedInstance(Class<? extends T> clazz, HttpRequest request, HttpResponse response)
      Description copied from class: ResteasyProviderFactory
      Property and constructor injection using the InjectorFactory.
      Specified by:
      injectedInstance in class ResteasyProviderFactory
      Type Parameters:
      T - type
      Parameters:
      clazz - class
      request - http request
      response - http response
      Returns:
      instance of type T
    • injectProperties

      public void injectProperties(Object obj)
      Specified by:
      injectProperties in class ResteasyProviderFactory
    • injectProperties

      public void injectProperties(Object obj, HttpRequest request, HttpResponse response)
      Specified by:
      injectProperties in class ResteasyProviderFactory
    • getMutableProperties

      public Map<String,Object> getMutableProperties()
      Specified by:
      getMutableProperties in class ResteasyProviderFactory
    • setProperties

      public ResteasyProviderFactory setProperties(Map<String,Object> properties)
      Specified by:
      setProperties in class ResteasyProviderFactory
    • getEnabledFeatures

      public Collection<Feature> getEnabledFeatures()
      Specified by:
      getEnabledFeatures in class ResteasyProviderFactory
    • getRxInvokerProvider

      public <I extends RxInvoker> RxInvokerProvider<I> getRxInvokerProvider(Class<I> clazz)
      Specified by:
      getRxInvokerProvider in class ResteasyProviderFactory
    • getRxInvokerProviderFromReactiveClass

      public RxInvokerProvider<?> getRxInvokerProviderFromReactiveClass(Class<?> clazz)
      Specified by:
      getRxInvokerProviderFromReactiveClass in class ResteasyProviderFactory
    • isReactive

      public boolean isReactive(Class<?> clazz)
      Specified by:
      isReactive in class ResteasyProviderFactory
    • getResourceBuilder

      public ResourceBuilder getResourceBuilder()
      Specified by:
      getResourceBuilder in class ResteasyProviderFactory
    • initializeClientProviders

      public void initializeClientProviders(ResteasyProviderFactory factory)
      Specified by:
      initializeClientProviders in class ResteasyProviderFactory
    • createUriBuilder

      public UriBuilder createUriBuilder()
      Description copied from class: RuntimeDelegate
      Create a new instance of a UriBuilder.
      Specified by:
      createUriBuilder in class RuntimeDelegate
      Returns:
      new UriBuilder instance.
      See Also:
    • createResponseBuilder

      public Response.ResponseBuilder createResponseBuilder()
      Description copied from class: RuntimeDelegate
      Create a new instance of a Response.ResponseBuilder.
      Specified by:
      createResponseBuilder in class RuntimeDelegate
      Returns:
      new ResponseBuilder instance.
      See Also:
    • createVariantListBuilder

      public Variant.VariantListBuilder createVariantListBuilder()
      Description copied from class: RuntimeDelegate
      Create a new instance of a Variant.VariantListBuilder.
      Specified by:
      createVariantListBuilder in class RuntimeDelegate
      Returns:
      new VariantListBuilder instance.
      See Also:
    • createEndpoint

      public <T> T createEndpoint(Application application, Class<T> endpointType) throws IllegalArgumentException, UnsupportedOperationException
      Description copied from class: RuntimeDelegate
      Create a configured instance of the supplied endpoint type. How the returned endpoint instance is published is dependent on the type of endpoint.
      Specified by:
      createEndpoint in class RuntimeDelegate
      Type Parameters:
      T - endpoint type.
      Parameters:
      application - the application configuration.
      endpointType - the type of endpoint instance to be created.
      Returns:
      a configured instance of the requested type.
      Throws:
      IllegalArgumentException - if application is null or the requested endpoint type is not supported.
      UnsupportedOperationException - if the implementation supports no endpoint types.
    • createHeaderDelegate

      public <T> RuntimeDelegate.HeaderDelegate<T> createHeaderDelegate(Class<T> type) throws IllegalArgumentException
      Description copied from class: RuntimeDelegate
      Obtain an instance of a RuntimeDelegate.HeaderDelegate for the supplied class. An implementation is required to support the following values for type: CacheControl, Cookie, EntityTag, Link, NewCookie, MediaType and java.util.Date.
      Specified by:
      createHeaderDelegate in class RuntimeDelegate
      Type Parameters:
      T - header type.
      Parameters:
      type - the class of the header.
      Returns:
      an instance of HeaderDelegate for the supplied type.
      Throws:
      IllegalArgumentException - if type is null.
      See Also:
    • createLinkBuilder

      public Link.Builder createLinkBuilder()
      Description copied from class: RuntimeDelegate
      Create a new instance of a Link.Builder.
      Specified by:
      createLinkBuilder in class RuntimeDelegate
      Returns:
      new Link.Builder instance.
      See Also:
    • getStatisticsController

      public StatisticsController getStatisticsController()
      Specified by:
      getStatisticsController in class ResteasyProviderFactory
    • getThrowableExceptionMapper

      public ExceptionMapper<Throwable> getThrowableExceptionMapper()
      Description copied from class: ResteasyProviderFactory
      Returns an exception mapper which handles the generic throwable which is typically the default exception mapper.
      Overrides:
      getThrowableExceptionMapper in class ResteasyProviderFactory
      Returns:
      an exception mapper which handles a Throwable
    • isOnServer

      protected boolean isOnServer()
      Specified by:
      isOnServer in class ResteasyProviderFactory
    • hasProperty

      public boolean hasProperty(String name)
      Description copied from interface: Configuration
      Check whether the property with a given name is configured.
      Parameters:
      name - property name.
      Returns:
      false if the property with such name is not configured, true otherwise.
    • createConfigurationBuilder

      public SeBootstrap.Configuration.Builder createConfigurationBuilder()
      Description copied from class: RuntimeDelegate
      Create a new instance of a SeBootstrap.Configuration.Builder.

      This method is not intended to be invoked by applications. Call SeBootstrap.Configuration.builder() instead.

      Specified by:
      createConfigurationBuilder in class RuntimeDelegate
      Returns:
      new SeBootstrap.Configuration.Builder instance.
      See Also:
    • bootstrap

      public CompletionStage<SeBootstrap.Instance> bootstrap(Application application, SeBootstrap.Configuration configuration)
      Description copied from class: RuntimeDelegate
      Perform startup of the application in Java SE environments.

      This method is not intended to be invoked by applications. Call SeBootstrap.start(Application, SeBootstrap.Configuration) instead.

      Specified by:
      bootstrap in class RuntimeDelegate
      Parameters:
      application - The application to start up.
      configuration - The bootstrap configuration.
      Returns:
      CompletionStage asynchronously producing handle of the running application instance.
    • bootstrap

      public CompletionStage<SeBootstrap.Instance> bootstrap(Class<? extends Application> clazz, SeBootstrap.Configuration configuration)
      Description copied from class: RuntimeDelegate
      Perform startup of the application in Java SE environments.

      This method is not intended to be invoked by applications. Call SeBootstrap.start(Class, SeBootstrap.Configuration) instead.

      Specified by:
      bootstrap in class RuntimeDelegate
      Parameters:
      clazz - The application class to instantiate and start.
      configuration - The bootstrap configuration.
      Returns:
      CompletionStage asynchronously producing handle of the running application instance.
    • createEntityPartBuilder

      public EntityPart.Builder createEntityPartBuilder(String partName) throws IllegalArgumentException
      Description copied from class: RuntimeDelegate
      Create a new instance of a EntityPart.Builder.

      This method is not intended to be invoked by applications. Call EntityPart.withName(String) instead.

      Specified by:
      createEntityPartBuilder in class RuntimeDelegate
      Parameters:
      partName - name for this part within the multipart body.
      Returns:
      new EntityPart.Builder instance with specified part name
      Throws:
      IllegalArgumentException - if partName is null.