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
-
Nested Class Summary
Nested classes/interfaces inherited from class jakarta.ws.rs.ext.RuntimeDelegate
jakarta.ws.rs.ext.RuntimeDelegate.HeaderDelegate<T>
-
Field Summary
Fields inherited from class jakarta.ws.rs.ext.RuntimeDelegate
JAXRS_RUNTIME_DELEGATE_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
addHeaderDelegate
(Class clazz, jakarta.ws.rs.ext.RuntimeDelegate.HeaderDelegate header) static void
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.abstract <T> StringParameterUnmarshaller
<T> createStringParameterUnmarshaller
(Class<T> clazz) abstract <T> AsyncClientResponseProvider
<T> getAsyncClientResponseProvider
(Class<T> type) abstract Map
<Class<?>, AsyncClientResponseProvider> abstract Map
<Type, ContextInjector> abstract <T> AsyncResponseProvider
<T> getAsyncResponseProvider
(Class<T> type) abstract Map
<Class<?>, AsyncResponseProvider> abstract <T> AsyncStreamProvider
<T> getAsyncStreamProvider
(Class<T> type) abstract Map
<Class<?>, AsyncStreamProvider> abstract Set
<jakarta.ws.rs.container.DynamicFeature> abstract <T> jakarta.ws.rs.ext.MessageBodyReader
<T> getClientMessageBodyReader
(Class<T> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) abstract <T> jakarta.ws.rs.ext.MessageBodyWriter
<T> getClientMessageBodyWriter
(Class<T> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) abstract JaxrsInterceptorRegistry
<jakarta.ws.rs.ext.ReaderInterceptor> abstract JaxrsInterceptorRegistry
<jakarta.ws.rs.client.ClientRequestFilter> abstract JaxrsInterceptorRegistry
<jakarta.ws.rs.client.ClientResponseFilter> abstract JaxrsInterceptorRegistry
<jakarta.ws.rs.ext.WriterInterceptor> abstract jakarta.ws.rs.core.MediaType
getConcreteMediaTypeFromMessageBodyWriters
(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) abstract JaxrsInterceptorRegistry
<jakarta.ws.rs.container.ContainerRequestFilter> abstract JaxrsInterceptorRegistry
<jakarta.ws.rs.container.ContainerResponseFilter> abstract <T> T
getContextData
(Class<T> type) abstract <T> T
getContextData
(Class<T> rawType, Type genericType, Annotation[] annotations, boolean unwrapAsync) abstract Map
<Type, ContextInjector> abstract List
<jakarta.ws.rs.ext.ContextResolver> getContextResolvers
(Class<?> clazz, jakarta.ws.rs.core.MediaType type) abstract Collection
<jakarta.ws.rs.core.Feature> 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.abstract InjectorFactory
static ResteasyProviderFactory
Initializes ResteasyProviderFactory singleton if not set.abstract jakarta.ws.rs.ext.ParamConverter
getParamConverter
(Class clazz, Type genericType, Annotation[] annotations) getPossibleMessageBodyWritersMap
(Class type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType accept) abstract ResourceBuilder
abstract <I extends jakarta.ws.rs.client.RxInvoker>
jakarta.ws.rs.client.RxInvokerProvider<I> getRxInvokerProvider
(Class<I> clazz) abstract jakarta.ws.rs.client.RxInvokerProvider
<?> getRxInvokerProviderFromReactiveClass
(Class<?> clazz) abstract Set
<jakarta.ws.rs.container.DynamicFeature> abstract <T> jakarta.ws.rs.ext.MessageBodyReader
<T> getServerMessageBodyReader
(Class<T> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) Deprecated.abstract <T> jakarta.ws.rs.ext.MessageBodyWriter
<T> getServerMessageBodyWriter
(Class<T> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) Deprecated.abstract JaxrsInterceptorRegistry
<jakarta.ws.rs.ext.ReaderInterceptor> abstract JaxrsInterceptorRegistry
<jakarta.ws.rs.ext.WriterInterceptor> abstract StatisticsController
jakarta.ws.rs.ext.ExceptionMapper
<Throwable> Returns an exception mapper which handles the generic throwable which is typically the default exception mapper.abstract void
abstract <T> T
injectedInstance
(Class<? extends T> clazz) Property and constructor injection using the InjectorFactory.abstract <T> T
injectedInstance
(Class<? extends T> clazz, HttpRequest request, HttpResponse response) Property and constructor injection using the InjectorFactory.abstract void
injectProperties
(Object obj) abstract void
injectProperties
(Object obj, HttpRequest request, HttpResponse response) static boolean
static boolean
abstract boolean
protected abstract boolean
abstract boolean
isReactive
(Class<?> clazz) abstract boolean
static ResteasyProviderFactory
static ResteasyProviderFactory
Will not initialize singleton if not set.protected abstract void
abstract void
registerProvider
(Class provider) abstract void
registerProvider
(Class provider, boolean isBuiltin) Register a @Provider class.abstract void
registerProvider
(Class provider, Integer priorityOverride, boolean isBuiltin, Map<Class<?>, Integer> contracts) abstract void
registerProviderInstance
(Object provider) Register a @Provider object.abstract void
registerProviderInstance
(Object provider, Map<Class<?>, Integer> contracts, Integer priorityOverride, boolean builtIn) abstract void
setBuiltinsRegistered
(boolean builtinsRegistered) abstract void
setInjectorFactory
(InjectorFactory injectorFactory) static void
setInstance
(ResteasyProviderFactory factory) abstract ResteasyProviderFactory
setProperties
(Map<String, Object> properties) static void
setRegisterBuiltinByDefault
(boolean registerBuiltinByDefault) abstract void
setRegisterBuiltins
(boolean registerBuiltins) abstract String
toString
(Object object, Class clazz, Type genericType, Annotation[] annotations) Convert an object to a string.Methods inherited from class jakarta.ws.rs.ext.RuntimeDelegate
bootstrap, bootstrap, createConfigurationBuilder, createEndpoint, createEntityPartBuilder, createHeaderDelegate, createLinkBuilder, createResponseBuilder, createUriBuilder, createVariantListBuilder, setInstance
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.ws.rs.core.Configurable
getConfiguration, property, register, register, register, register, register, register, register, register
Methods inherited from interface jakarta.ws.rs.core.Configuration
getClasses, getContracts, getInstances, getProperties, getProperty, getPropertyNames, getRuntimeType, hasProperty, isEnabled, isEnabled, isRegistered, isRegistered
Methods inherited from interface org.jboss.resteasy.spi.HeaderValueProcessor
toHeaderString
Methods inherited from interface jakarta.ws.rs.ext.Providers
getContextResolver, getExceptionMapper, getMessageBodyReader, getMessageBodyWriter
-
Constructor Details
-
ResteasyProviderFactory
public ResteasyProviderFactory()
-
-
Method Details
-
getServerDynamicFeatures
-
getClientDynamicFeatures
-
getAsyncResponseProviders
-
getAsyncClientResponseProviders
-
getAsyncStreamProviders
-
getContextInjectors
-
getAsyncContextInjectors
-
getProviderClasses
-
getProviderInstances
-
getContextData
-
getContextData
public abstract <T> T getContextData(Class<T> rawType, Type genericType, Annotation[] annotations, boolean unwrapAsync) -
peekInstance
Will not initialize singleton if not set.- Returns:
- provider factory singleton
-
clearInstanceIfEqual
-
setInstance
-
getInstance
Initializes ResteasyProviderFactory singleton if not set.- Returns:
- singleton provider factory
-
newInstance
-
setRegisterBuiltinByDefault
public static void setRegisterBuiltinByDefault(boolean registerBuiltinByDefault) -
isA
-
isA
-
registerBuiltin
protected abstract void registerBuiltin() -
isRegisterBuiltins
public abstract boolean isRegisterBuiltins() -
setRegisterBuiltins
public abstract void setRegisterBuiltins(boolean registerBuiltins) -
getInjectorFactory
-
setInjectorFactory
-
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
-
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
-
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
- objectclazz
- classgenericType
- generic typeannotations
- array of annotation- Returns:
- string representation
-
getHeaderDelegate
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
Register a @Provider class. Can be a MessageBodyReader/Writer or ExceptionMapper.- Parameters:
provider
- provider classisBuiltin
- built-in
-
registerProvider
-
registerProviderInstance
Register a @Provider object. Can be a MessageBodyReader/Writer or ExceptionMapper.- Parameters:
provider
- provider instance
-
registerProviderInstance
-
getAsyncResponseProvider
-
getAsyncClientResponseProvider
-
getAsyncStreamProvider
-
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
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
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
- classrequest
- http requestresponse
- http response- Returns:
- instance of type T
-
injectProperties
-
injectProperties
-
getMutableProperties
-
setProperties
-
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
-
getResourceBuilder
-
initializeClientProviders
-
getStatisticsController
-
getThrowableExceptionMapper
-
isOnServer
protected abstract boolean isOnServer()
-