Class PerRequestProviderWrapper
- java.lang.Object
-
- org.restlet.ext.jaxrs.internal.wrappers.provider.AbstractProviderWrapper
-
- org.restlet.ext.jaxrs.internal.wrappers.provider.PerRequestProviderWrapper
-
- All Implemented Interfaces:
ProviderWrapper
@Deprecated class PerRequestProviderWrapper extends AbstractProviderWrapper
Deprecated.Will be removed in next minor release.
-
-
Field Summary
Fields Modifier and Type Field Description private JaxRsProvidersallProvidersDeprecated.private ExtensionBackwardMappingextensionBackwardMappingDeprecated.private java.lang.Class<?>jaxRsProviderClassDeprecated.private java.util.logging.LoggerloggerDeprecated.private ObjectFactoryobjectFactoryDeprecated.private ThreadLocalizedContexttlContextDeprecated.
-
Constructor Summary
Constructors Constructor Description PerRequestProviderWrapper(java.lang.Class<?> jaxRsProviderClass, ObjectFactory objectFactory, ThreadLocalizedContext tlContext, JaxRsProviders allProviders, ExtensionBackwardMapping extensionBackwardMapping, java.util.logging.Logger logger)Deprecated.Creates a new wrapper for a Provider and initializes the provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private java.lang.ObjectcreateInstance()Deprecated.booleanequals(java.lang.Object otherProvider)Deprecated.java.lang.StringgetClassName()Deprecated.java.lang.Class<?>getExcMapperType()Deprecated.Beispiele: ExceptionMapper<IllegalArgumentException> -> IllegalArgumentException MessageBodyReader<Integer> -> IntegerContextResolvergetInitializedCtxResolver()Deprecated.javax.ws.rs.ext.ExceptionMapper<? extends java.lang.Throwable>getInitializedExcMapper()Deprecated.MessageBodyReadergetInitializedReader()Deprecated.MessageBodyWritergetInitializedWriter()Deprecated.inthashCode()Deprecated.voidinitAtAppStartUp(ThreadLocalizedContext tlContext, javax.ws.rs.ext.Providers allProviders, ExtensionBackwardMapping extensionBackwardMapping)Deprecated.This method does nothing in this class.private java.lang.ObjectinstantiateAndInitialize()Deprecated.Instantiates the provider class, initializes the instance and returns it unwrapped.booleanisContextResolver()Deprecated.Returns true, if this ProviderWrapper is also aContextResolver, otherwise false.booleanisExceptionMapper()Deprecated.Checks, if this provider represents anExceptionMapper.booleanisReader()Deprecated.Returns true, if this ProviderWrapper is also aMessageBodyReader, otherwise false.booleanisWriter()Deprecated.Returns true, if this ProviderWrapper is also aMessageBodyWriter, otherwise false.-
Methods inherited from class org.restlet.ext.jaxrs.internal.wrappers.provider.AbstractProviderWrapper
getConsumedMimes, getProducedMimes, initProvider, supportsRead, supportsRead, supportsWrite, supportsWrite, supportsWrite, supportsWrite, toString
-
-
-
-
Field Detail
-
allProviders
private final JaxRsProviders allProviders
Deprecated.
-
extensionBackwardMapping
private final ExtensionBackwardMapping extensionBackwardMapping
Deprecated.
-
jaxRsProviderClass
private final java.lang.Class<?> jaxRsProviderClass
Deprecated.
-
logger
private final java.util.logging.Logger logger
Deprecated.
-
objectFactory
private final ObjectFactory objectFactory
Deprecated.
-
tlContext
private final ThreadLocalizedContext tlContext
Deprecated.
-
-
Constructor Detail
-
PerRequestProviderWrapper
public PerRequestProviderWrapper(java.lang.Class<?> jaxRsProviderClass, ObjectFactory objectFactory, ThreadLocalizedContext tlContext, JaxRsProviders allProviders, ExtensionBackwardMapping extensionBackwardMapping, java.util.logging.Logger logger) throws java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, MissingConstructorException, InstantiateException, MissingAnnotationException, javax.ws.rs.WebApplicationException, IllegalConstrParamTypeException, IllegalPathParamTypeExceptionDeprecated.Creates a new wrapper for a Provider and initializes the provider. If the given class is not a provider, anIllegalArgumentExceptionis thrown.- Parameters:
jaxRsProviderClass- the JAX-RS provider class.objectFactory- The object factory is responsible for the provider instantiation, if given.tlContext-allProviders-extensionBackwardMapping-logger-- Throws:
java.lang.IllegalArgumentExceptionjava.lang.reflect.InvocationTargetExceptionMissingConstructorExceptionInstantiateExceptionMissingAnnotationExceptionjavax.ws.rs.WebApplicationExceptionIllegalConstrParamTypeExceptionIllegalPathParamTypeException
-
-
Method Detail
-
createInstance
private java.lang.Object createInstance() throws java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, InstantiateException, MissingAnnotationException, javax.ws.rs.WebApplicationException, IllegalConstrParamTypeException, IllegalPathParamTypeException, MissingConstructorExceptionDeprecated.- Parameters:
providerConstructor- the constructor to use.jaxRsProviderClass- class for exception message.tlContext- The tread local wrapped call contextallProviders- all entity providers. <<<<<<< .mine =======allResolvers- all availableContextResolvers. >>>>>>> .r3440extensionBackwardMapping- the extension backward mappinglogger- the logger to use- Throws:
java.lang.IllegalArgumentExceptionjava.lang.reflect.InvocationTargetException- if the constructor throws an ThrowableInstantiateExceptionMissingAnnotationExceptionjavax.ws.rs.WebApplicationExceptionIllegalConstrParamTypeException- if one of the fields or bean setters annotated with @Contexthas a type that must not be annotated with @Context.IllegalPathParamTypeExceptionMissingConstructorException
-
equals
public final boolean equals(java.lang.Object otherProvider)
Deprecated.- Specified by:
equalsin interfaceProviderWrapper- Specified by:
equalsin classAbstractProviderWrapper
-
getClassName
public java.lang.String getClassName()
Deprecated.- Specified by:
getClassNamein interfaceProviderWrapper- Specified by:
getClassNamein classAbstractProviderWrapper- Returns:
- the JAX-RS provider class name
- See Also:
ProviderWrapper.getClassName()
-
getExcMapperType
public java.lang.Class<?> getExcMapperType()
Deprecated.Description copied from interface:ProviderWrapperBeispiele:- ExceptionMapper<IllegalArgumentException> -> IllegalArgumentException
- MessageBodyReader<Integer> -> Integer
- Returns:
- the type the wrapped exception mapper could map.
- See Also:
ProviderWrapper.getExcMapperType()
-
getInitializedCtxResolver
public ContextResolver getInitializedCtxResolver() throws ProviderNotInitializableException
Deprecated.- Returns:
- an initialized
ContextResolver - Throws:
ProviderNotInitializableException- See Also:
ProviderWrapper.getInitializedCtxResolver()
-
getInitializedExcMapper
public javax.ws.rs.ext.ExceptionMapper<? extends java.lang.Throwable> getInitializedExcMapper() throws ProviderNotInitializableExceptionDeprecated.- Returns:
- the initialized exception mapper
- Throws:
ProviderNotInitializableException- See Also:
ProviderWrapper.getInitializedExcMapper()
-
getInitializedReader
public MessageBodyReader getInitializedReader() throws ProviderNotInitializableException
Deprecated.- Returns:
- an initialized reader
- Throws:
ProviderNotInitializableException- See Also:
ProviderWrapper.getInitializedReader()
-
getInitializedWriter
public MessageBodyWriter getInitializedWriter() throws ProviderNotInitializableException
Deprecated.- Returns:
- an initialized writer
- Throws:
ProviderNotInitializableException- See Also:
ProviderWrapper.getInitializedWriter()
-
hashCode
public int hashCode()
Deprecated.- Specified by:
hashCodein interfaceProviderWrapper- Specified by:
hashCodein classAbstractProviderWrapper- See Also:
ProviderWrapper.hashCode()
-
initAtAppStartUp
public void initAtAppStartUp(ThreadLocalizedContext tlContext, javax.ws.rs.ext.Providers allProviders, ExtensionBackwardMapping extensionBackwardMapping) throws InjectException, java.lang.reflect.InvocationTargetException, IllegalTypeException
Deprecated.This method does nothing in this class.- Throws:
InjectExceptionjava.lang.reflect.InvocationTargetExceptionIllegalTypeException- See Also:
ProviderWrapper.initAtAppStartUp(ThreadLocalizedContext, Providers, ExtensionBackwardMapping)
-
instantiateAndInitialize
private java.lang.Object instantiateAndInitialize() throws ProviderNotInitializableExceptionDeprecated.Instantiates the provider class, initializes the instance and returns it unwrapped.- Throws:
ProviderNotInitializableExceptionjavax.ws.rs.WebApplicationException
-
isContextResolver
public boolean isContextResolver()
Deprecated.Description copied from class:AbstractProviderWrapperReturns true, if this ProviderWrapper is also aContextResolver, otherwise false.- Specified by:
isContextResolverin interfaceProviderWrapper- Specified by:
isContextResolverin classAbstractProviderWrapper- Returns:
- true, if this ProviderWrapper is also a
ContextResolver, otherwise false. - See Also:
ProviderWrapper.isContextResolver()
-
isExceptionMapper
public boolean isExceptionMapper()
Deprecated.Description copied from class:AbstractProviderWrapperChecks, if this provider represents anExceptionMapper.- Specified by:
isExceptionMapperin interfaceProviderWrapper- Specified by:
isExceptionMapperin classAbstractProviderWrapper- Returns:
- true, if this provider is an
ExceptionMapper, or false if not. - See Also:
ProviderWrapper.isExceptionMapper()
-
isReader
public boolean isReader()
Deprecated.Description copied from class:AbstractProviderWrapperReturns true, if this ProviderWrapper is also aMessageBodyReader, otherwise false.- Specified by:
isReaderin interfaceProviderWrapper- Specified by:
isReaderin classAbstractProviderWrapper- Returns:
- true, if this ProviderWrapper is also a
MessageBodyReader, otherwise false. - See Also:
ProviderWrapper.isReader()
-
isWriter
public boolean isWriter()
Deprecated.Description copied from class:AbstractProviderWrapperReturns true, if this ProviderWrapper is also aMessageBodyWriter, otherwise false.- Specified by:
isWriterin interfaceProviderWrapper- Specified by:
isWriterin classAbstractProviderWrapper- Returns:
- true, if this ProviderWrapper is also a
MessageBodyWriter, otherwise false. - See Also:
ProviderWrapper.isWriter()
-
-