public class ResteasyProviderFactory extends javax.ws.rs.ext.RuntimeDelegate implements javax.ws.rs.ext.Providers, HeaderValueProcessor, javax.ws.rs.core.Configurable<ResteasyProviderFactory>, javax.ws.rs.core.Configuration
Modifier and Type | Class and Description |
---|---|
static interface |
ResteasyProviderFactory.CloseableContext |
protected static class |
ResteasyProviderFactory.ExtSortedKey<T> |
protected static class |
ResteasyProviderFactory.SortedKey<T>
Allow us to sort message body implementations that are more specific for their types
i.e.
|
Constructor and Description |
---|
ResteasyProviderFactory() |
ResteasyProviderFactory(ResteasyProviderFactory parent)
Copies a specific component registry when a new
provider is added.
|
ResteasyProviderFactory(ResteasyProviderFactory parent,
boolean local)
If local is true, copies components needed by client configuration,
so that parent is not referenced.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addAsyncClientResponseProvider(AsyncClientResponseProvider provider) |
protected void |
addAsyncClientResponseProvider(AsyncClientResponseProvider provider,
Class providerClass) |
protected void |
addAsyncClientResponseProvider(AsyncClientResponseProvider provider,
Type asyncType) |
protected void |
addAsyncClientResponseProvider(Class<? extends AsyncClientResponseProvider> providerClass) |
protected void |
addAsyncResponseProvider(AsyncResponseProvider provider) |
protected void |
addAsyncResponseProvider(AsyncResponseProvider provider,
Class providerClass) |
protected void |
addAsyncResponseProvider(AsyncResponseProvider provider,
Type asyncType) |
protected void |
addAsyncResponseProvider(Class<? extends AsyncResponseProvider> providerClass) |
protected void |
addAsyncStreamProvider(AsyncStreamProvider provider) |
protected void |
addAsyncStreamProvider(AsyncStreamProvider provider,
Class providerClass) |
protected void |
addAsyncStreamProvider(AsyncStreamProvider provider,
Type asyncType) |
protected void |
addAsyncStreamProvider(Class<? extends AsyncStreamProvider> providerClass) |
void |
addClientErrorInterceptor(ClientErrorInterceptor handler)
Add a
ClientErrorInterceptor to this provider factory instance. |
void |
addClientExceptionMapper(Class<? extends ClientExceptionMapper<?>> providerClass) |
void |
addClientExceptionMapper(ClientExceptionMapper<?> provider) |
void |
addClientExceptionMapper(ClientExceptionMapper<?> provider,
Class<?> providerClass) |
void |
addClientExceptionMapper(ClientExceptionMapper<?> provider,
Type exceptionType) |
protected void |
addClientMessageBodyReader(ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader> key,
javax.ws.rs.Consumes consumeMime) |
protected void |
addClientMessageBodyWriter(javax.ws.rs.Produces consumeMime,
ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter> key) |
static ResteasyProviderFactory.CloseableContext |
addCloseableContextDataLevel() |
static ResteasyProviderFactory.CloseableContext |
addCloseableContextDataLevel(Map<Class<?>,Object> data) |
static Map<Class<?>,Object> |
addContextDataLevel() |
protected void |
addContextResolver(Class<? extends javax.ws.rs.ext.ContextResolver> resolver,
boolean builtin) |
protected void |
addContextResolver(Class<? extends javax.ws.rs.ext.ContextResolver> resolver,
int priority,
boolean builtin) |
protected void |
addContextResolver(javax.ws.rs.ext.ContextResolver provider) |
protected void |
addContextResolver(javax.ws.rs.ext.ContextResolver provider,
boolean builtin) |
protected void |
addContextResolver(javax.ws.rs.ext.ContextResolver provider,
Class providerClass,
boolean builtin) |
protected void |
addContextResolver(javax.ws.rs.ext.ContextResolver provider,
int priority) |
protected void |
addContextResolver(javax.ws.rs.ext.ContextResolver provider,
int priority,
boolean builtin) |
protected void |
addContextResolver(javax.ws.rs.ext.ContextResolver provider,
int priority,
Class providerClass,
boolean builtin) |
protected void |
addContextResolver(javax.ws.rs.ext.ContextResolver provider,
int priority,
Type typeParameter,
Class providerClass,
boolean builtin) |
protected void |
addContextResolver(javax.ws.rs.ext.ContextResolver provider,
Type typeParameter,
Class providerClass,
boolean builtin) |
protected void |
addExceptionMapper(Class<? extends javax.ws.rs.ext.ExceptionMapper> providerClass) |
protected void |
addExceptionMapper(Class<? extends javax.ws.rs.ext.ExceptionMapper> providerClass,
boolean isBuiltin) |
protected void |
addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider) |
protected void |
addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider,
boolean isBuiltin) |
protected void |
addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider,
Class providerClass) |
protected void |
addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider,
Class providerClass,
boolean isBuiltin) |
protected void |
addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider,
Type exceptionType) |
protected void |
addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider,
Type exceptionType,
Class providerClass,
boolean isBuiltin) |
void |
addHeaderDelegate(Class clazz,
javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate header) |
protected void |
addMessageBodyReader(Class<? extends javax.ws.rs.ext.MessageBodyReader> provider,
int priority,
boolean isBuiltin) |
protected void |
addMessageBodyReader(javax.ws.rs.ext.MessageBodyReader provider) |
protected void |
addMessageBodyReader(javax.ws.rs.ext.MessageBodyReader provider,
Class<?> providerClass,
int priority,
boolean isBuiltin)
Specify the provider class.
|
protected void |
addMessageBodyReader(javax.ws.rs.ext.MessageBodyReader provider,
int priority,
boolean isBuiltin) |
protected void |
addMessageBodyWriter(Class<? extends javax.ws.rs.ext.MessageBodyWriter> provider,
int priority,
boolean isBuiltin) |
protected void |
addMessageBodyWriter(javax.ws.rs.ext.MessageBodyWriter provider) |
protected void |
addMessageBodyWriter(javax.ws.rs.ext.MessageBodyWriter provider,
Class<?> providerClass,
int priority,
boolean isBuiltin)
Specify the provider class.
|
protected void |
addResourceClassProcessor(Class<ResourceClassProcessor> processorClass,
int priority) |
protected void |
addResourceClassProcessor(ResourceClassProcessor processor,
int priority) |
protected void |
addServerMessageBodyReader(ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader> key,
javax.ws.rs.Consumes consumeMime) |
protected void |
addServerMessageBodyWriter(javax.ws.rs.Produces consumeMime,
ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter> key) |
protected void |
addStringConverter(Class<? extends StringConverter> resolver) |
protected void |
addStringConverter(StringConverter provider) |
protected void |
addStringConverter(StringConverter provider,
Class providerClass) |
protected void |
addStringConverter(StringConverter provider,
Type typeParameter) |
void |
addStringParameterUnmarshaller(Class<? extends StringParameterUnmarshaller> provider) |
void |
appendInterceptorPrecedence(String precedence)
Deprecated.
|
static void |
clearContextData() |
static void |
clearInstanceIfEqual(ResteasyProviderFactory factory) |
<T> ConstructorInjector |
createConstructorInjector(Class<? extends T> clazz) |
<T> T |
createEndpoint(javax.ws.rs.core.Application applicationConfig,
Class<T> endpointType)
This is a spec method that is unsupported.
|
<T> javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<T> |
createHeaderDelegate(Class<T> tClass) |
protected <T> javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<T> |
createHeaderDelegateFromInterfaces(Class<?>[] interfaces) |
javax.ws.rs.core.Link.Builder |
createLinkBuilder() |
<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.
|
javax.ws.rs.core.Response.ResponseBuilder |
createResponseBuilder() |
<T> StringParameterUnmarshaller<T> |
createStringParameterUnmarshaller(Class<T> clazz) |
javax.ws.rs.core.UriBuilder |
createUriBuilder() |
javax.ws.rs.core.Variant.VariantListBuilder |
createVariantListBuilder() |
<T> AsyncClientResponseProvider<T> |
getAsyncClientResponseProvider(Class<T> type) |
Map<Class<?>,AsyncClientResponseProvider> |
getAsyncClientResponseProviders() |
<T> AsyncResponseProvider<T> |
getAsyncResponseProvider(Class<T> type) |
Map<Class<?>,AsyncResponseProvider> |
getAsyncResponseProviders() |
<T> AsyncStreamProvider<T> |
getAsyncStreamProvider(Class<T> type) |
Map<Class<?>,AsyncStreamProvider> |
getAsyncStreamProviders() |
Map<Class<?>,Map<Class<?>,Integer>> |
getClassContracts() |
Set<Class<?>> |
getClasses() |
Set<javax.ws.rs.container.DynamicFeature> |
getClientDynamicFeatures() |
List<ClientErrorInterceptor> |
getClientErrorInterceptors()
Return the list of currently registered
ClientErrorInterceptor instances. |
<T extends Throwable> |
getClientExceptionMapper(Class<T> type) |
protected Map<Class<?>,ClientExceptionMapper> |
getClientExceptionMappers() |
InterceptorRegistry<ClientExecutionInterceptor> |
getClientExecutionInterceptorRegistry() |
<T> javax.ws.rs.ext.MessageBodyReader<T> |
getClientMessageBodyReader(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader>> |
getClientMessageBodyReaders() |
<T> javax.ws.rs.ext.MessageBodyWriter<T> |
getClientMessageBodyWriter(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter>> |
getClientMessageBodyWriters() |
ReaderInterceptorRegistry |
getClientReaderInterceptorRegistry() |
ClientRequestFilterRegistry |
getClientRequestFilterRegistry() |
JaxrsInterceptorRegistry<javax.ws.rs.client.ClientRequestFilter> |
getClientRequestFilters()
Deprecated.
|
ClientResponseFilterRegistry |
getClientResponseFilters() |
WriterInterceptorRegistry |
getClientWriterInterceptorRegistry() |
javax.ws.rs.core.MediaType |
getConcreteMediaTypeFromMessageBodyWriters(Class type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
javax.ws.rs.core.Configuration |
getConfiguration() |
ContainerRequestFilterRegistry |
getContainerRequestFilterRegistry() |
ContainerResponseFilterRegistry |
getContainerResponseFilterRegistry() |
static <T> T |
getContextData(Class<T> type) |
static int |
getContextDataLevelCount() |
static Map<Class<?>,Object> |
getContextDataMap() |
static Map<Class<?>,Object> |
getContextDataMap(boolean create) |
<T> javax.ws.rs.ext.ContextResolver<T> |
getContextResolver(Class<T> contextType,
javax.ws.rs.core.MediaType mediaType) |
protected Map<Class<?>,MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.ContextResolver>>> |
getContextResolvers() |
List<javax.ws.rs.ext.ContextResolver> |
getContextResolvers(Class<?> clazz,
javax.ws.rs.core.MediaType type) |
Map<Class<?>,Integer> |
getContracts(Class<?> componentClass) |
Collection<javax.ws.rs.core.Feature> |
getEnabledFeatures() |
<T extends Throwable> |
getExceptionMapper(Class<T> type) |
Map<Class<?>,javax.ws.rs.ext.ExceptionMapper> |
getExceptionMappers() |
Set<Class<?>> |
getFeatureClasses() |
Set<Object> |
getFeatureInstances() |
javax.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.
|
protected Map<Class<?>,javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate> |
getHeaderDelegates() |
InjectorFactory |
getInjectorFactory() |
static ResteasyProviderFactory |
getInstance()
Initializes ResteasyProviderFactory singleton if not set.
|
Set<Object> |
getInstances() |
<T> javax.ws.rs.ext.MessageBodyReader<T> |
getMessageBodyReader(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Always returns server MBRs.
|
<T> javax.ws.rs.ext.MessageBodyWriter<T> |
getMessageBodyWriter(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
Always gets server MBW.
|
Map<String,Object> |
getMutableProperties() |
javax.ws.rs.ext.ParamConverter |
getParamConverter(Class clazz,
Type genericType,
Annotation[] annotations) |
List<javax.ws.rs.ext.ParamConverterProvider> |
getParamConverterProviders() |
ResteasyProviderFactory |
getParent() |
Map<javax.ws.rs.ext.MessageBodyWriter<?>,Class<?>> |
getPossibleMessageBodyWritersMap(Class type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType accept) |
protected LegacyPrecedence |
getPrecedence() |
protected int |
getPriority(Integer override,
Map<Class<?>,Integer> contracts,
Class type,
Class<?> component) |
Map<String,Object> |
getProperties() |
Object |
getProperty(String name) |
Collection<String> |
getPropertyNames() |
Set<Class<?>> |
getProviderClasses()
Gets provide classes.
|
Set<Object> |
getProviderInstances()
Gets provider instances.
|
ResourceBuilder |
getResourceBuilder() |
javax.ws.rs.RuntimeType |
getRuntimeType() |
<I extends javax.ws.rs.client.RxInvoker> |
getRxInvokerProvider(Class<I> clazz) |
javax.ws.rs.client.RxInvokerProvider<?> |
getRxInvokerProviderFromReactiveClass(Class<?> clazz) |
Set<javax.ws.rs.container.DynamicFeature> |
getServerDynamicFeatures() |
<T> javax.ws.rs.ext.MessageBodyReader<T> |
getServerMessageBodyReader(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader>> |
getServerMessageBodyReaders() |
<T> javax.ws.rs.ext.MessageBodyWriter<T> |
getServerMessageBodyWriter(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter>> |
getServerMessageBodyWriters() |
ReaderInterceptorRegistry |
getServerReaderInterceptorRegistry() |
WriterInterceptorRegistry |
getServerWriterInterceptorRegistry() |
protected Map<Class<?>,ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.ExceptionMapper>> |
getSortedExceptionMappers() |
protected Set<ResteasyProviderFactory.ExtSortedKey<javax.ws.rs.ext.ParamConverterProvider>> |
getSortedParamConverterProviders() |
StatisticsController |
getStatisticsController() |
StringConverter |
getStringConverter(Class<?> clazz) |
protected Map<Class<?>,StringConverter> |
getStringConverters() |
protected Map<Class<?>,Class<? extends StringParameterUnmarshaller>> |
getStringParameterUnmarshallers() |
protected void |
initialize() |
protected void |
initialize(ResteasyProviderFactory parent) |
void |
initializeClientProviders(ResteasyProviderFactory factory) |
<T> T |
injectedInstance(Class<? extends T> clazz)
Property and constructor injection using the InjectorFactory.
|
<T> T |
injectedInstance(Class<? extends T> clazz,
HttpRequest request,
HttpResponse response)
Property and constructor injection using the InjectorFactory.
|
void |
injectProperties(Class declaring,
Object obj) |
void |
injectProperties(Object obj) |
void |
injectProperties(Object obj,
HttpRequest request,
HttpResponse response) |
void |
insertInterceptorPrecedenceAfter(String after,
String newPrecedence)
Deprecated.
|
void |
insertInterceptorPrecedenceBefore(String before,
String newPrecedence)
Deprecated.
|
protected boolean |
isA(Class target,
Class type,
Map<Class<?>,Integer> contracts) |
static boolean |
isA(Class target,
Class type,
Set<Class<?>> contracts) |
protected boolean |
isA(Object target,
Class type,
Map<Class<?>,Integer> contracts) |
static boolean |
isA(Object target,
Class type,
Set<Class<?>> contracts) |
boolean |
isBuiltinsRegistered() |
boolean |
isEnabled(Class<? extends javax.ws.rs.core.Feature> featureClass) |
boolean |
isEnabled(javax.ws.rs.core.Feature feature) |
protected boolean |
isOnServer() |
boolean |
isReactive(Class<?> clazz) |
boolean |
isRegisterBuiltins() |
boolean |
isRegistered(Class<?> componentClass) |
boolean |
isRegistered(Object component) |
static ResteasyProviderFactory |
newInstance() |
static ResteasyProviderFactory |
peekInstance()
Will not initialize singleton if not set.
|
static <T> T |
popContextData(Class<T> type) |
ResteasyProviderFactory |
property(String name,
Object value) |
static <T> void |
pushContext(Class<T> type,
T data) |
static void |
pushContextDataMap(Map<Class<?>,Object> map) |
ResteasyProviderFactory |
register(Class<?> providerClass) |
ResteasyProviderFactory |
register(Class<?> componentClass,
Class<?>... contracts) |
ResteasyProviderFactory |
register(Class<?> componentClass,
int priority) |
ResteasyProviderFactory |
register(Class<?> componentClass,
Map<Class<?>,Integer> contracts) |
ResteasyProviderFactory |
register(Object provider) |
ResteasyProviderFactory |
register(Object component,
Class<?>... contracts) |
ResteasyProviderFactory |
register(Object component,
int priority) |
ResteasyProviderFactory |
register(Object component,
Map<Class<?>,Integer> contracts) |
protected void |
registerDefaultInterceptorPrecedences() |
protected void |
registerDefaultInterceptorPrecedences(InterceptorRegistry registry) |
void |
registerProvider(Class provider) |
void |
registerProvider(Class provider,
boolean isBuiltin)
Register a @Provider class.
|
void |
registerProvider(Class provider,
Integer priorityOverride,
boolean isBuiltin,
Map<Class<?>,Integer> contracts) |
void |
registerProviderInstance(Object provider)
Register a @Provider object.
|
void |
registerProviderInstance(Object provider,
Map<Class<?>,Integer> contracts,
Integer priorityOverride,
boolean builtIn) |
void |
registerSingletonResource(SingletonResource resource) |
static void |
removeContextDataLevel() |
protected <T> javax.ws.rs.ext.MessageBodyReader<T> |
resolveMessageBodyReader(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader>> availableReaders) |
protected <T> javax.ws.rs.ext.MessageBodyWriter<T> |
resolveMessageBodyWriter(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter>> availableWriters) |
static Object |
searchContextData(Object o) |
void |
setBuiltinsRegistered(boolean builtinsRegistered) |
void |
setInjectorFactory(InjectorFactory injectorFactory) |
static void |
setInstance(ResteasyProviderFactory factory) |
ResteasyProviderFactory |
setProperties(Map<String,?> properties) |
static void |
setRegisterBuiltinByDefault(boolean registerBuiltinByDefault) |
void |
setRegisterBuiltins(boolean registerBuiltins) |
String |
toHeaderString(Object object)
Convert an object to a header string.
|
String |
toString(Object object,
Class clazz,
Type genericType,
Annotation[] annotations)
Convert an object to a string.
|
protected static AtomicReference<ResteasyProviderFactory> pfr
protected static ThreadLocalStack<Map<Class<?>,Object>> contextualData
protected static int maxForwards
protected static volatile ResteasyProviderFactory instance
public static boolean registerBuiltinByDefault
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader>> serverMessageBodyReaders
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter>> serverMessageBodyWriters
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader>> clientMessageBodyReaders
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter>> clientMessageBodyWriters
protected Map<Class<?>,ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.ExceptionMapper>> sortedExceptionMappers
protected Map<Class<?>,ClientExceptionMapper> clientExceptionMappers
protected Map<Class<?>,AsyncResponseProvider> asyncResponseProviders
protected Map<Class<?>,AsyncClientResponseProvider> asyncClientResponseProviders
protected Map<Class<?>,AsyncStreamProvider> asyncStreamProviders
protected Map<Class<?>,MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.ContextResolver>>> contextResolvers
protected Map<Class<?>,StringConverter> stringConverters
protected Set<ResteasyProviderFactory.ExtSortedKey<javax.ws.rs.ext.ParamConverterProvider>> sortedParamConverterProviders
protected List<javax.ws.rs.ext.ParamConverterProvider> paramConverterProviders
protected Map<Class<?>,Class<? extends StringParameterUnmarshaller>> stringParameterUnmarshallers
protected Map<Class<?>,javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate> headerDelegates
protected LegacyPrecedence precedence
protected ReaderInterceptorRegistry serverReaderInterceptorRegistry
protected WriterInterceptorRegistry serverWriterInterceptorRegistry
protected ContainerRequestFilterRegistry containerRequestFilterRegistry
protected ContainerResponseFilterRegistry containerResponseFilterRegistry
protected ClientRequestFilterRegistry clientRequestFilterRegistry
@Deprecated protected JaxrsInterceptorRegistry<javax.ws.rs.client.ClientRequestFilter> clientRequestFilters
protected ClientResponseFilterRegistry clientResponseFilters
protected ReaderInterceptorRegistry clientReaderInterceptorRegistry
protected WriterInterceptorRegistry clientWriterInterceptorRegistry
protected InterceptorRegistry<ClientExecutionInterceptor> clientExecutionInterceptorRegistry
protected List<ClientErrorInterceptor> clientErrorInterceptors
protected boolean builtinsRegistered
protected boolean registerBuiltins
protected InjectorFactory injectorFactory
protected ResteasyProviderFactory parent
protected Set<javax.ws.rs.container.DynamicFeature> serverDynamicFeatures
protected Set<javax.ws.rs.container.DynamicFeature> clientDynamicFeatures
protected Set<javax.ws.rs.core.Feature> enabledFeatures
protected Map<Class<?>,Class<? extends javax.ws.rs.client.RxInvokerProvider<?>>> reactiveClasses
protected ResourceBuilder resourceBuilder
public ResteasyProviderFactory()
public ResteasyProviderFactory(ResteasyProviderFactory parent)
parent
- provider factorypublic ResteasyProviderFactory(ResteasyProviderFactory parent, boolean local)
parent
- provider factorylocal
- localprotected void initialize()
protected void initialize(ResteasyProviderFactory parent)
public Set<javax.ws.rs.container.DynamicFeature> getServerDynamicFeatures()
public Set<javax.ws.rs.container.DynamicFeature> getClientDynamicFeatures()
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader>> getServerMessageBodyReaders()
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter>> getServerMessageBodyWriters()
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader>> getClientMessageBodyReaders()
protected MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter>> getClientMessageBodyWriters()
protected Map<Class<?>,ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.ExceptionMapper>> getSortedExceptionMappers()
protected Map<Class<?>,ClientExceptionMapper> getClientExceptionMappers()
public Map<Class<?>,AsyncClientResponseProvider> getAsyncClientResponseProviders()
public Map<Class<?>,AsyncResponseProvider> getAsyncResponseProviders()
public Map<Class<?>,AsyncStreamProvider> getAsyncStreamProviders()
protected void addAsyncClientResponseProvider(Class<? extends AsyncClientResponseProvider> providerClass)
protected void addAsyncClientResponseProvider(AsyncClientResponseProvider provider)
protected void addAsyncClientResponseProvider(AsyncClientResponseProvider provider, Class providerClass)
protected void addAsyncClientResponseProvider(AsyncClientResponseProvider provider, Type asyncType)
protected Map<Class<?>,MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.ContextResolver>>> getContextResolvers()
protected Map<Class<?>,StringConverter> getStringConverters()
public List<javax.ws.rs.ext.ParamConverterProvider> getParamConverterProviders()
protected Set<ResteasyProviderFactory.ExtSortedKey<javax.ws.rs.ext.ParamConverterProvider>> getSortedParamConverterProviders()
protected Map<Class<?>,Class<? extends StringParameterUnmarshaller>> getStringParameterUnmarshallers()
public Set<Class<?>> getProviderClasses()
public Set<Object> getProviderInstances()
protected LegacyPrecedence getPrecedence()
public ResteasyProviderFactory getParent()
protected void registerDefaultInterceptorPrecedences(InterceptorRegistry registry)
protected void registerDefaultInterceptorPrecedences()
@Deprecated public void appendInterceptorPrecedence(String precedence)
precedence
- precedence@Deprecated public void insertInterceptorPrecedenceAfter(String after, String newPrecedence)
after
- put newPrecedence after thisnewPrecedence
- new precedence@Deprecated public void insertInterceptorPrecedenceBefore(String before, String newPrecedence)
before
- put newPrecedence before thisnewPrecedence
- new precedencepublic static <T> void pushContext(Class<T> type, T data)
public static <T> T getContextData(Class<T> type)
public static <T> T popContextData(Class<T> type)
public static void clearContextData()
public static ResteasyProviderFactory.CloseableContext addCloseableContextDataLevel()
public static ResteasyProviderFactory.CloseableContext addCloseableContextDataLevel(Map<Class<?>,Object> data)
public static int getContextDataLevelCount()
public static void removeContextDataLevel()
public static ResteasyProviderFactory peekInstance()
public static void clearInstanceIfEqual(ResteasyProviderFactory factory)
public static void setInstance(ResteasyProviderFactory factory)
public static ResteasyProviderFactory getInstance()
public static ResteasyProviderFactory newInstance()
public static void setRegisterBuiltinByDefault(boolean registerBuiltinByDefault)
public boolean isRegisterBuiltins()
public void setRegisterBuiltins(boolean registerBuiltins)
public InjectorFactory getInjectorFactory()
public void setInjectorFactory(InjectorFactory injectorFactory)
public InterceptorRegistry<ClientExecutionInterceptor> getClientExecutionInterceptorRegistry()
public ReaderInterceptorRegistry getServerReaderInterceptorRegistry()
public WriterInterceptorRegistry getServerWriterInterceptorRegistry()
public ContainerRequestFilterRegistry getContainerRequestFilterRegistry()
public ContainerResponseFilterRegistry getContainerResponseFilterRegistry()
public ReaderInterceptorRegistry getClientReaderInterceptorRegistry()
public WriterInterceptorRegistry getClientWriterInterceptorRegistry()
public ClientRequestFilterRegistry getClientRequestFilterRegistry()
@Deprecated public JaxrsInterceptorRegistry<javax.ws.rs.client.ClientRequestFilter> getClientRequestFilters()
public ClientResponseFilterRegistry getClientResponseFilters()
public boolean isBuiltinsRegistered()
public void setBuiltinsRegistered(boolean builtinsRegistered)
public javax.ws.rs.core.UriBuilder createUriBuilder()
createUriBuilder
in class javax.ws.rs.ext.RuntimeDelegate
public javax.ws.rs.core.Response.ResponseBuilder createResponseBuilder()
createResponseBuilder
in class javax.ws.rs.ext.RuntimeDelegate
public javax.ws.rs.core.Variant.VariantListBuilder createVariantListBuilder()
createVariantListBuilder
in class javax.ws.rs.ext.RuntimeDelegate
public <T> javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<T> createHeaderDelegate(Class<T> tClass)
createHeaderDelegate
in class javax.ws.rs.ext.RuntimeDelegate
protected <T> javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate<T> createHeaderDelegateFromInterfaces(Class<?>[] interfaces)
protected Map<Class<?>,javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate> getHeaderDelegates()
public void addHeaderDelegate(Class clazz, javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate header)
protected void addMessageBodyReader(Class<? extends javax.ws.rs.ext.MessageBodyReader> provider, int priority, boolean isBuiltin)
protected void addMessageBodyReader(javax.ws.rs.ext.MessageBodyReader provider)
protected void addMessageBodyReader(javax.ws.rs.ext.MessageBodyReader provider, int priority, boolean isBuiltin)
protected void addMessageBodyReader(javax.ws.rs.ext.MessageBodyReader provider, Class<?> providerClass, int priority, boolean isBuiltin)
provider
- message readerproviderClass
- provider classpriority
- priorityisBuiltin
- built-inprotected void addServerMessageBodyReader(ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader> key, javax.ws.rs.Consumes consumeMime)
protected void addClientMessageBodyReader(ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader> key, javax.ws.rs.Consumes consumeMime)
protected void addMessageBodyWriter(Class<? extends javax.ws.rs.ext.MessageBodyWriter> provider, int priority, boolean isBuiltin)
protected void addMessageBodyWriter(javax.ws.rs.ext.MessageBodyWriter provider)
protected void addMessageBodyWriter(javax.ws.rs.ext.MessageBodyWriter provider, Class<?> providerClass, int priority, boolean isBuiltin)
provider
- message readerproviderClass
- provider classpriority
- priorityisBuiltin
- built-inprotected void addServerMessageBodyWriter(javax.ws.rs.Produces consumeMime, ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter> key)
protected void addClientMessageBodyWriter(javax.ws.rs.Produces consumeMime, ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter> key)
public <T> javax.ws.rs.ext.MessageBodyReader<T> getServerMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public <T> javax.ws.rs.ext.MessageBodyReader<T> getMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getMessageBodyReader
in interface javax.ws.rs.ext.Providers
T
- typetype
- 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.public <T> javax.ws.rs.ext.MessageBodyReader<T> getClientMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
protected <T> javax.ws.rs.ext.MessageBodyReader<T> resolveMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyReader>> availableReaders)
protected void addExceptionMapper(Class<? extends javax.ws.rs.ext.ExceptionMapper> providerClass)
protected void addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider)
protected void addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider, Class providerClass)
protected void addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider, Type exceptionType)
protected void addExceptionMapper(Class<? extends javax.ws.rs.ext.ExceptionMapper> providerClass, boolean isBuiltin)
protected void addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider, boolean isBuiltin)
protected void addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider, Class providerClass, boolean isBuiltin)
protected void addExceptionMapper(javax.ws.rs.ext.ExceptionMapper provider, Type exceptionType, Class providerClass, boolean isBuiltin)
public void addClientExceptionMapper(Class<? extends ClientExceptionMapper<?>> providerClass)
public void addClientExceptionMapper(ClientExceptionMapper<?> provider)
public void addClientExceptionMapper(ClientExceptionMapper<?> provider, Class<?> providerClass)
public void addClientExceptionMapper(ClientExceptionMapper<?> provider, Type exceptionType)
public void addClientErrorInterceptor(ClientErrorInterceptor handler)
ClientErrorInterceptor
to this provider factory instance.
Duplicate handlers are ignored. (For Client Proxy API only)handler
- ClientErrorInterceptor handlerpublic List<ClientErrorInterceptor> getClientErrorInterceptors()
ClientErrorInterceptor
instances.ClientErrorInterceptor
instancesprotected void addAsyncResponseProvider(Class<? extends AsyncResponseProvider> providerClass)
protected void addAsyncResponseProvider(AsyncResponseProvider provider)
protected void addAsyncResponseProvider(AsyncResponseProvider provider, Class providerClass)
protected void addAsyncResponseProvider(AsyncResponseProvider provider, Type asyncType)
protected void addAsyncStreamProvider(Class<? extends AsyncStreamProvider> providerClass)
protected void addAsyncStreamProvider(AsyncStreamProvider provider)
protected void addAsyncStreamProvider(AsyncStreamProvider provider, Class providerClass)
protected void addAsyncStreamProvider(AsyncStreamProvider provider, Type asyncType)
protected void addContextResolver(Class<? extends javax.ws.rs.ext.ContextResolver> resolver, int priority, boolean builtin)
protected void addContextResolver(javax.ws.rs.ext.ContextResolver provider, int priority)
protected void addContextResolver(javax.ws.rs.ext.ContextResolver provider, int priority, boolean builtin)
protected void addContextResolver(javax.ws.rs.ext.ContextResolver provider, int priority, Class providerClass, boolean builtin)
protected void addContextResolver(javax.ws.rs.ext.ContextResolver provider, int priority, Type typeParameter, Class providerClass, boolean builtin)
protected void addContextResolver(Class<? extends javax.ws.rs.ext.ContextResolver> resolver, boolean builtin)
protected void addContextResolver(javax.ws.rs.ext.ContextResolver provider)
protected void addContextResolver(javax.ws.rs.ext.ContextResolver provider, boolean builtin)
protected void addContextResolver(javax.ws.rs.ext.ContextResolver provider, Class providerClass, boolean builtin)
protected void addContextResolver(javax.ws.rs.ext.ContextResolver provider, Type typeParameter, Class providerClass, boolean builtin)
protected void addStringConverter(Class<? extends StringConverter> resolver)
protected void addStringConverter(StringConverter provider)
protected void addStringConverter(StringConverter provider, Class providerClass)
protected void addStringConverter(StringConverter provider, Type typeParameter)
public void addStringParameterUnmarshaller(Class<? extends StringParameterUnmarshaller> provider)
public List<javax.ws.rs.ext.ContextResolver> getContextResolvers(Class<?> clazz, javax.ws.rs.core.MediaType type)
public javax.ws.rs.ext.ParamConverter getParamConverter(Class clazz, Type genericType, Annotation[] annotations)
public StringConverter getStringConverter(Class<?> clazz)
public <T> StringParameterUnmarshaller<T> createStringParameterUnmarshaller(Class<T> clazz)
public void registerProvider(Class provider)
public String toString(Object object, Class clazz, Type genericType, Annotation[] annotations)
object
- objectclazz
- classgenericType
- generic typeannotations
- array of annotationpublic String toHeaderString(Object object)
HeaderValueProcessor
toHeaderString
in interface HeaderValueProcessor
object
- header objectpublic javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate getHeaderDelegate(Class<?> aClass)
aClass
- class of the headerpublic void registerProvider(Class provider, boolean isBuiltin)
provider
- provider classisBuiltin
- built-inprotected int getPriority(Integer override, Map<Class<?>,Integer> contracts, Class type, Class<?> component)
public void registerProvider(Class provider, Integer priorityOverride, boolean isBuiltin, Map<Class<?>,Integer> contracts)
public void registerProviderInstance(Object provider)
provider
- provider instancepublic void registerProviderInstance(Object provider, Map<Class<?>,Integer> contracts, Integer priorityOverride, boolean builtIn)
public <T extends Throwable> javax.ws.rs.ext.ExceptionMapper<T> getExceptionMapper(Class<T> type)
getExceptionMapper
in interface javax.ws.rs.ext.Providers
public <T extends Throwable> ClientExceptionMapper<T> getClientExceptionMapper(Class<T> type)
public <T> AsyncResponseProvider<T> getAsyncResponseProvider(Class<T> type)
public <T> AsyncClientResponseProvider<T> getAsyncClientResponseProvider(Class<T> type)
public <T> AsyncStreamProvider<T> getAsyncStreamProvider(Class<T> type)
public javax.ws.rs.core.MediaType getConcreteMediaTypeFromMessageBodyWriters(Class type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public Map<javax.ws.rs.ext.MessageBodyWriter<?>,Class<?>> getPossibleMessageBodyWritersMap(Class type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType accept)
public <T> javax.ws.rs.ext.MessageBodyWriter<T> getServerMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public <T> javax.ws.rs.ext.MessageBodyWriter<T> getMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getMessageBodyWriter
in interface javax.ws.rs.ext.Providers
T
- typetype
- 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.public <T> javax.ws.rs.ext.MessageBodyWriter<T> getClientMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
protected <T> javax.ws.rs.ext.MessageBodyWriter<T> resolveMessageBodyWriter(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, MediaTypeMap<ResteasyProviderFactory.SortedKey<javax.ws.rs.ext.MessageBodyWriter>> availableWriters)
public <T> T createEndpoint(javax.ws.rs.core.Application applicationConfig, Class<T> endpointType) throws IllegalArgumentException, UnsupportedOperationException
createEndpoint
in class javax.ws.rs.ext.RuntimeDelegate
applicationConfig
- applicationendpointType
- endpoint typeIllegalArgumentException
- if applicationConfig is nullUnsupportedOperationException
- allways throw since this method is not supportedpublic <T> javax.ws.rs.ext.ContextResolver<T> getContextResolver(Class<T> contextType, javax.ws.rs.core.MediaType mediaType)
getContextResolver
in interface javax.ws.rs.ext.Providers
public <T> T createProviderInstance(Class<? extends T> clazz)
T
- typeclazz
- classpublic <T> ConstructorInjector createConstructorInjector(Class<? extends T> clazz)
public <T> T injectedInstance(Class<? extends T> clazz)
T
- typeclazz
- classpublic void registerSingletonResource(SingletonResource resource)
public <T> T injectedInstance(Class<? extends T> clazz, HttpRequest request, HttpResponse response)
T
- typeclazz
- classrequest
- http requestresponse
- http responsepublic void injectProperties(Object obj)
public void injectProperties(Object obj, HttpRequest request, HttpResponse response)
public Map<String,Object> getProperties()
getProperties
in interface javax.ws.rs.core.Configuration
public Object getProperty(String name)
getProperty
in interface javax.ws.rs.core.Configuration
public ResteasyProviderFactory setProperties(Map<String,?> properties)
public ResteasyProviderFactory property(String name, Object value)
property
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public Collection<javax.ws.rs.core.Feature> getEnabledFeatures()
public ResteasyProviderFactory register(Class<?> providerClass)
register
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public ResteasyProviderFactory register(Object provider)
register
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public ResteasyProviderFactory register(Class<?> componentClass, int priority)
register
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public ResteasyProviderFactory register(Class<?> componentClass, Class<?>... contracts)
register
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public ResteasyProviderFactory register(Object component, int priority)
register
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public ResteasyProviderFactory register(Object component, Class<?>... contracts)
register
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public ResteasyProviderFactory register(Class<?> componentClass, Map<Class<?>,Integer> contracts)
register
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public ResteasyProviderFactory register(Object component, Map<Class<?>,Integer> contracts)
register
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public javax.ws.rs.core.Configuration getConfiguration()
getConfiguration
in interface javax.ws.rs.core.Configurable<ResteasyProviderFactory>
public javax.ws.rs.RuntimeType getRuntimeType()
getRuntimeType
in interface javax.ws.rs.core.Configuration
public Collection<String> getPropertyNames()
getPropertyNames
in interface javax.ws.rs.core.Configuration
public boolean isEnabled(javax.ws.rs.core.Feature feature)
isEnabled
in interface javax.ws.rs.core.Configuration
public boolean isEnabled(Class<? extends javax.ws.rs.core.Feature> featureClass)
isEnabled
in interface javax.ws.rs.core.Configuration
public boolean isRegistered(Object component)
isRegistered
in interface javax.ws.rs.core.Configuration
public boolean isRegistered(Class<?> componentClass)
isRegistered
in interface javax.ws.rs.core.Configuration
public Map<Class<?>,Integer> getContracts(Class<?> componentClass)
getContracts
in interface javax.ws.rs.core.Configuration
public Set<Class<?>> getClasses()
getClasses
in interface javax.ws.rs.core.Configuration
public Set<Object> getInstances()
getInstances
in interface javax.ws.rs.core.Configuration
public javax.ws.rs.core.Link.Builder createLinkBuilder()
createLinkBuilder
in class javax.ws.rs.ext.RuntimeDelegate
public <I extends javax.ws.rs.client.RxInvoker> javax.ws.rs.client.RxInvokerProvider<I> getRxInvokerProvider(Class<I> clazz)
protected void addResourceClassProcessor(Class<ResourceClassProcessor> processorClass, int priority)
protected void addResourceClassProcessor(ResourceClassProcessor processor, int priority)
public ResourceBuilder getResourceBuilder()
public javax.ws.rs.client.RxInvokerProvider<?> getRxInvokerProviderFromReactiveClass(Class<?> clazz)
public boolean isReactive(Class<?> clazz)
public void initializeClientProviders(ResteasyProviderFactory factory)
public StatisticsController getStatisticsController()
protected boolean isOnServer()
Copyright © 2021 JBoss by Red Hat. All rights reserved.