Class ResteasyProviderFactory

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

public abstract class ResteasyProviderFactory extends jakarta.ws.rs.ext.RuntimeDelegate implements jakarta.ws.rs.ext.Providers, HeaderValueProcessor, jakarta.ws.rs.core.Configurable<ResteasyProviderFactory>, jakarta.ws.rs.core.Configuration
Version:
$Revision: 1 $
Author:
Bill Burke
  • Constructor Details

    • ResteasyProviderFactory

      public ResteasyProviderFactory()
  • Method Details

    • getServerDynamicFeatures

      public abstract Set<jakarta.ws.rs.container.DynamicFeature> getServerDynamicFeatures()
    • getClientDynamicFeatures

      public abstract Set<jakarta.ws.rs.container.DynamicFeature> getClientDynamicFeatures()
    • getAsyncResponseProviders

      public abstract Map<Class<?>,AsyncResponseProvider> getAsyncResponseProviders()
    • getAsyncClientResponseProviders

      public abstract Map<Class<?>,AsyncClientResponseProvider> getAsyncClientResponseProviders()
    • getAsyncStreamProviders

      public abstract Map<Class<?>,AsyncStreamProvider> getAsyncStreamProviders()
    • getContextInjectors

      public abstract Map<Type,ContextInjector> getContextInjectors()
    • getAsyncContextInjectors

      public abstract Map<Type,ContextInjector> getAsyncContextInjectors()
    • getProviderClasses

      public abstract Set<Class<?>> getProviderClasses()
    • getProviderInstances

      public abstract Set<Object> getProviderInstances()
    • getContextData

      public abstract <T> T getContextData(Class<T> type)
    • getContextData

      public abstract <T> T getContextData(Class<T> rawType, Type genericType, Annotation[] annotations, boolean unwrapAsync)
    • peekInstance

      public static ResteasyProviderFactory peekInstance()
      Will not initialize singleton if not set.
      Returns:
      provider factory singleton
    • clearInstanceIfEqual

      public static void clearInstanceIfEqual(ResteasyProviderFactory factory)
    • setInstance

      public static void setInstance(ResteasyProviderFactory factory)
    • getInstance

      public static ResteasyProviderFactory getInstance()
      Initializes ResteasyProviderFactory singleton if not set.
      Returns:
      singleton provider factory
    • newInstance

      public static ResteasyProviderFactory newInstance()
    • setRegisterBuiltinByDefault

      public static void setRegisterBuiltinByDefault(boolean registerBuiltinByDefault)
    • isA

      public static boolean isA(Class target, Class type, Set<Class<?>> contracts)
    • isA

      public static boolean isA(Object target, Class type, Set<Class<?>> contracts)
    • registerBuiltin

      protected abstract void registerBuiltin()
    • isRegisterBuiltins

      public abstract boolean isRegisterBuiltins()
    • setRegisterBuiltins

      public abstract void setRegisterBuiltins(boolean registerBuiltins)
    • getInjectorFactory

      public abstract InjectorFactory getInjectorFactory()
    • setInjectorFactory

      public abstract void setInjectorFactory(InjectorFactory injectorFactory)
    • getServerReaderInterceptorRegistry

      public abstract JaxrsInterceptorRegistry<jakarta.ws.rs.ext.ReaderInterceptor> getServerReaderInterceptorRegistry()
    • getServerWriterInterceptorRegistry

      public abstract JaxrsInterceptorRegistry<jakarta.ws.rs.ext.WriterInterceptor> getServerWriterInterceptorRegistry()
    • getContainerRequestFilterRegistry

      public abstract JaxrsInterceptorRegistry<jakarta.ws.rs.container.ContainerRequestFilter> getContainerRequestFilterRegistry()
    • getContainerResponseFilterRegistry

      public abstract JaxrsInterceptorRegistry<jakarta.ws.rs.container.ContainerResponseFilter> getContainerResponseFilterRegistry()
    • getClientReaderInterceptorRegistry

      public abstract JaxrsInterceptorRegistry<jakarta.ws.rs.ext.ReaderInterceptor> getClientReaderInterceptorRegistry()
    • getClientWriterInterceptorRegistry

      public abstract JaxrsInterceptorRegistry<jakarta.ws.rs.ext.WriterInterceptor> getClientWriterInterceptorRegistry()
    • getClientRequestFilterRegistry

      public abstract JaxrsInterceptorRegistry<jakarta.ws.rs.client.ClientRequestFilter> getClientRequestFilterRegistry()
    • getClientResponseFilters

      public abstract JaxrsInterceptorRegistry<jakarta.ws.rs.client.ClientResponseFilter> getClientResponseFilters()
    • isBuiltinsRegistered

      public abstract boolean isBuiltinsRegistered()
    • setBuiltinsRegistered

      public abstract void setBuiltinsRegistered(boolean builtinsRegistered)
    • addHeaderDelegate

      public abstract void addHeaderDelegate(Class clazz, jakarta.ws.rs.ext.RuntimeDelegate.HeaderDelegate header)
    • getServerMessageBodyReader

      @Deprecated public abstract <T> jakarta.ws.rs.ext.MessageBodyReader<T> getServerMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Deprecated.
    • getClientMessageBodyReader

      public abstract <T> jakarta.ws.rs.ext.MessageBodyReader<T> getClientMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
    • getContextResolvers

      public abstract List<jakarta.ws.rs.ext.ContextResolver> getContextResolvers(Class<?> clazz, jakarta.ws.rs.core.MediaType type)
    • getParamConverter

      public abstract jakarta.ws.rs.ext.ParamConverter getParamConverter(Class clazz, Type genericType, Annotation[] annotations)
    • createStringParameterUnmarshaller

      public abstract <T> StringParameterUnmarshaller<T> createStringParameterUnmarshaller(Class<T> clazz)
    • registerProvider

      public abstract void registerProvider(Class provider)
    • toString

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

      public abstract jakarta.ws.rs.ext.RuntimeDelegate.HeaderDelegate getHeaderDelegate(Class<?> aClass)
      Checks to see if RuntimeDelegate is a ResteasyProviderFactory If it is, then use that, otherwise use this.
      Parameters:
      aClass - class of the header
      Returns:
      header delegate
    • registerProvider

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

      public abstract void registerProvider(Class provider, Integer priorityOverride, boolean isBuiltin, Map<Class<?>,Integer> contracts)
    • registerProviderInstance

      public abstract void registerProviderInstance(Object provider)
      Register a @Provider object. Can be a MessageBodyReader/Writer or ExceptionMapper.
      Parameters:
      provider - provider instance
    • registerProviderInstance

      public abstract void registerProviderInstance(Object provider, Map<Class<?>,Integer> contracts, Integer priorityOverride, boolean builtIn)
    • getAsyncResponseProvider

      public abstract <T> AsyncResponseProvider<T> getAsyncResponseProvider(Class<T> type)
    • getAsyncClientResponseProvider

      public abstract <T> AsyncClientResponseProvider<T> getAsyncClientResponseProvider(Class<T> type)
    • getAsyncStreamProvider

      public abstract <T> AsyncStreamProvider<T> getAsyncStreamProvider(Class<T> type)
    • getConcreteMediaTypeFromMessageBodyWriters

      public abstract jakarta.ws.rs.core.MediaType getConcreteMediaTypeFromMessageBodyWriters(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
    • getPossibleMessageBodyWritersMap

      public abstract Map<jakarta.ws.rs.ext.MessageBodyWriter<?>,Class<?>> getPossibleMessageBodyWritersMap(Class type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType accept)
    • getServerMessageBodyWriter

      @Deprecated public abstract <T> jakarta.ws.rs.ext.MessageBodyWriter<T> getServerMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Deprecated.
    • getClientMessageBodyWriter

      public abstract <T> jakarta.ws.rs.ext.MessageBodyWriter<T> getClientMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
    • createProviderInstance

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

      public abstract <T> T injectedInstance(Class<? extends T> clazz)
      Property and constructor injection using the InjectorFactory.
      Type Parameters:
      T - type
      Parameters:
      clazz - class
      Returns:
      instance of type T
    • injectedInstance

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

      public abstract void injectProperties(Object obj)
    • injectProperties

      public abstract void injectProperties(Object obj, HttpRequest request, HttpResponse response)
    • getMutableProperties

      public abstract Map<String,Object> getMutableProperties()
    • setProperties

      public abstract ResteasyProviderFactory setProperties(Map<String,Object> properties)
    • getEnabledFeatures

      public abstract Collection<jakarta.ws.rs.core.Feature> getEnabledFeatures()
    • getRxInvokerProvider

      public abstract <I extends jakarta.ws.rs.client.RxInvoker> jakarta.ws.rs.client.RxInvokerProvider<I> getRxInvokerProvider(Class<I> clazz)
    • getRxInvokerProviderFromReactiveClass

      public abstract jakarta.ws.rs.client.RxInvokerProvider<?> getRxInvokerProviderFromReactiveClass(Class<?> clazz)
    • isReactive

      public abstract boolean isReactive(Class<?> clazz)
    • getResourceBuilder

      public abstract ResourceBuilder getResourceBuilder()
    • initializeClientProviders

      public abstract void initializeClientProviders(ResteasyProviderFactory factory)
    • getStatisticsController

      public abstract StatisticsController getStatisticsController()
    • getThrowableExceptionMapper

      public jakarta.ws.rs.ext.ExceptionMapper<Throwable> getThrowableExceptionMapper()
      Returns an exception mapper which handles the generic throwable which is typically the default exception mapper.
      Returns:
      an exception mapper which handles a Throwable
    • isOnServer

      protected abstract boolean isOnServer()