Class AbstractProviderWrapper
- java.lang.Object
-
- org.restlet.ext.jaxrs.internal.wrappers.provider.AbstractProviderWrapper
-
- All Implemented Interfaces:
ProviderWrapper
- Direct Known Subclasses:
PerRequestProviderWrapper,SingletonProvider
@Deprecated abstract class AbstractProviderWrapper extends java.lang.Object implements ProviderWrapper
Deprecated.Will be removed in next minor release.Wraps a JAX-RS provider, see chapter 4 of JAX-RS specification.- See Also:
Provider
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<MediaType>consumedMimesDeprecated.the mimes this MessageBodyReader consumes.private java.lang.Class<?>genericMbrTypeDeprecated.private java.lang.Class<?>genericMbwTypeDeprecated.private java.util.List<MediaType>producedMimesDeprecated.
-
Constructor Summary
Constructors Constructor Description AbstractProviderWrapper(java.lang.Class<?> jaxRsProviderClass)Deprecated.Creates a new wrapper for a Provider and initializes the provider.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract booleanequals(java.lang.Object otherProvider)Deprecated.abstract java.lang.StringgetClassName()Deprecated.java.util.List<MediaType>getConsumedMimes()Deprecated.Returns the list of producedMediaTypes of the wrappedMessageBodyWriter.java.util.List<MediaType>getProducedMimes()Deprecated.Returns the list of producedMediaTypes of the wrappedMessageBodyWriter.abstract inthashCode()Deprecated.(package private) voidinitProvider(java.lang.Object jaxRsProvider, ThreadLocalizedContext tlContext, javax.ws.rs.ext.Providers allProviders, ExtensionBackwardMapping extensionBackwardMapping)Deprecated.initializes the provider (injection into annotated fields and setters).abstract booleanisContextResolver()Deprecated.Returns true, if this ProviderWrapper is also aContextResolver, otherwise false.abstract booleanisExceptionMapper()Deprecated.Checks, if this provider represents anExceptionMapper.abstract booleanisReader()Deprecated.Returns true, if this ProviderWrapper is also aMessageBodyReader, otherwise false.abstract booleanisWriter()Deprecated.Returns true, if this ProviderWrapper is also aMessageBodyWriter, otherwise false.booleansupportsRead(java.lang.Class<?> entityClass, java.lang.reflect.Type genericType)Deprecated.Checks, if this message body reader supports the given type (by the type parameter of theMessageBodyWriter)booleansupportsRead(MediaType mediaType)Deprecated.Checks, if this MessageBodyReader supports the given MediaType.booleansupportsWrite(java.lang.Class<?> entityClass, java.lang.reflect.Type genericType)Deprecated.Checks, if this message body writer supports the given type (by the type parameter of theMessageBodyWriter)booleansupportsWrite(java.lang.Iterable<MediaType> mediaTypes)Deprecated.Checks, if the wrapped MessageBodyWriter supports at least one of the requestedMediaTypes.booleansupportsWrite(javax.ws.rs.core.MediaType requested)Deprecated.Checks, if the wrapped MessageBodyWriter supports at least one of the requestedMediaTypes.booleansupportsWrite(MediaType requested)Deprecated.Checks, if the wrapped MessageBodyWriter supports at least one of the requestedMediaTypes.java.lang.StringtoString()Deprecated.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.restlet.ext.jaxrs.internal.wrappers.provider.ProviderWrapper
getExcMapperType, getInitializedCtxResolver, getInitializedExcMapper, getInitializedReader, getInitializedWriter, initAtAppStartUp
-
-
-
-
Field Detail
-
consumedMimes
private final java.util.List<MediaType> consumedMimes
Deprecated.the mimes this MessageBodyReader consumes.
-
genericMbrType
private final java.lang.Class<?> genericMbrType
Deprecated.
-
genericMbwType
private final java.lang.Class<?> genericMbwType
Deprecated.
-
producedMimes
private final java.util.List<MediaType> producedMimes
Deprecated.
-
-
Constructor Detail
-
AbstractProviderWrapper
AbstractProviderWrapper(java.lang.Class<?> jaxRsProviderClass) throws java.lang.IllegalArgumentException, javax.ws.rs.WebApplicationExceptionDeprecated.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.- Throws:
java.lang.IllegalArgumentException- if the class is not a valid provider, may not be instantiated or what ever.javax.ws.rs.WebApplicationException- See Also:
MessageBodyReader,MessageBodyWriter,ContextResolver
-
-
Method Detail
-
equals
public abstract boolean equals(java.lang.Object otherProvider)
Deprecated.- Specified by:
equalsin interfaceProviderWrapper- Overrides:
equalsin classjava.lang.Object
-
getClassName
public abstract java.lang.String getClassName()
Deprecated.- Specified by:
getClassNamein interfaceProviderWrapper- Returns:
- the JAX-RS provider class name
-
getConsumedMimes
public java.util.List<MediaType> getConsumedMimes()
Deprecated.Returns the list of producedMediaTypes of the wrappedMessageBodyWriter.- Specified by:
getConsumedMimesin interfaceProviderWrapper- Returns:
- List of produced
MediaTypes.
-
getProducedMimes
public java.util.List<MediaType> getProducedMimes()
Deprecated.Returns the list of producedMediaTypes of the wrappedMessageBodyWriter.- Specified by:
getProducedMimesin interfaceProviderWrapper- Returns:
- List of produced
MediaTypes. If the entity provider is not annotated with @Produces, '*/*' is returned.
-
hashCode
public abstract int hashCode()
Deprecated.- Specified by:
hashCodein interfaceProviderWrapper- Overrides:
hashCodein classjava.lang.Object
-
initProvider
void initProvider(java.lang.Object jaxRsProvider, ThreadLocalizedContext tlContext, javax.ws.rs.ext.Providers allProviders, ExtensionBackwardMapping extensionBackwardMapping) throws IllegalFieldTypeException, IllegalBeanSetterTypeException, InjectException, java.lang.reflect.InvocationTargetExceptionDeprecated.initializes the provider (injection into annotated fields and setters).- Throws:
IllegalFieldTypeExceptionIllegalBeanSetterTypeExceptionInjectExceptionjava.lang.reflect.InvocationTargetException
-
isContextResolver
public abstract boolean isContextResolver()
Deprecated.Returns true, if this ProviderWrapper is also aContextResolver, otherwise false.- Specified by:
isContextResolverin interfaceProviderWrapper- Returns:
- true, if this ProviderWrapper is also a
ContextResolver, otherwise false.
-
isExceptionMapper
public abstract boolean isExceptionMapper()
Deprecated.Checks, if this provider represents anExceptionMapper.- Specified by:
isExceptionMapperin interfaceProviderWrapper- Returns:
- true, if this provider is an
ExceptionMapper, or false if not.
-
isReader
public abstract boolean isReader()
Deprecated.Returns true, if this ProviderWrapper is also aMessageBodyReader, otherwise false.- Specified by:
isReaderin interfaceProviderWrapper- Returns:
- true, if this ProviderWrapper is also a
MessageBodyReader, otherwise false.
-
isWriter
public abstract boolean isWriter()
Deprecated.Returns true, if this ProviderWrapper is also aMessageBodyWriter, otherwise false.- Specified by:
isWriterin interfaceProviderWrapper- Returns:
- true, if this ProviderWrapper is also a
MessageBodyWriter, otherwise false.
-
supportsRead
public boolean supportsRead(java.lang.Class<?> entityClass, java.lang.reflect.Type genericType)Deprecated.Checks, if this message body reader supports the given type (by the type parameter of theMessageBodyWriter)- Parameters:
entityClass- the typegenericType- the generic type- Returns:
- true, if this MessageBodyReader supports the given type, false, if not.
- See Also:
MessageBodyReader.supportsRead(Class, Type)
-
supportsRead
public boolean supportsRead(MediaType mediaType)
Deprecated.Checks, if this MessageBodyReader supports the given MediaType.- Specified by:
supportsReadin interfaceProviderWrapper- Parameters:
mediaType-- Returns:
- true, if the wrapped
MessageBodyReadersupports the read for the given media type.
-
supportsWrite
public boolean supportsWrite(java.lang.Class<?> entityClass, java.lang.reflect.Type genericType)Deprecated.Checks, if this message body writer supports the given type (by the type parameter of theMessageBodyWriter)- Parameters:
entityClass- the typegenericType- the generic type- Returns:
- true, if this MessageBodyWriter supports the given type, false, if not.
- See Also:
MessageBodyWriter.supportsWrite(java.lang.Class, java.lang.reflect.Type)
-
supportsWrite
public boolean supportsWrite(java.lang.Iterable<MediaType> mediaTypes)
Deprecated.Checks, if the wrapped MessageBodyWriter supports at least one of the requestedMediaTypes.- Specified by:
supportsWritein interfaceProviderWrapper- Parameters:
mediaTypes- theMediaTypes- Returns:
- true, if at least one of the requested
MediaTypes is supported, otherwise false.
-
supportsWrite
public boolean supportsWrite(javax.ws.rs.core.MediaType requested)
Deprecated.Description copied from interface:ProviderWrapperChecks, if the wrapped MessageBodyWriter supports at least one of the requestedMediaTypes.- Specified by:
supportsWritein interfaceProviderWrapper- Parameters:
requested- the requestedMediaTypes- Returns:
- true, if at least one of the requested
MediaTypes is supported, otherwise false.
-
supportsWrite
public boolean supportsWrite(MediaType requested)
Deprecated.Checks, if the wrapped MessageBodyWriter supports at least one of the requestedMediaTypes.- Specified by:
supportsWritein interfaceProviderWrapper- Parameters:
requested- the requestedMediaTypes- Returns:
- true, if at least one of the requested
MediaTypes is supported, otherwise false.
-
toString
public final java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-