public class XmlRootElementPayloadMethodProcessor extends AbstractJaxb2PayloadMethodProcessor
MethodArgumentResolver
and MethodReturnValueHandler
that supports parameters annotated with @XmlRootElement
or @XmlType
, and return values annotated with @XmlRootElement
.logger
Constructor and Description |
---|
XmlRootElementPayloadMethodProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
handleReturnValueInternal(MessageContext messageContext,
MethodParameter returnType,
Object returnValue) |
Object |
resolveArgument(MessageContext messageContext,
MethodParameter parameter)
Resolves the given parameter into a method argument.
|
protected boolean |
supportsRequestPayloadParameter(MethodParameter parameter)
Indicates whether the given method parameter, annotated with
RequestPayload ,
is supported by this resolver. |
protected boolean |
supportsResponsePayloadReturnType(MethodParameter returnType)
Indicates whether the given method return type, annotated with
ResponsePayload , is supported. |
createMarshaller, createUnmarshaller, handleReturnValue, marshalToResponsePayload, unmarshalElementFromRequestPayload, unmarshalFromRequestPayload
convertToByteArrayInputStream, supportsParameter, supportsReturnType
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
public XmlRootElementPayloadMethodProcessor()
protected boolean supportsRequestPayloadParameter(MethodParameter parameter)
AbstractPayloadMethodProcessor
RequestPayload
,
is supported by this resolver.supportsRequestPayloadParameter
in class AbstractPayloadMethodProcessor
parameter
- the method parameter to checktrue
if this resolver supports the supplied parameter; false
otherwisepublic Object resolveArgument(MessageContext messageContext, MethodParameter parameter) throws JAXBException
MethodArgumentResolver
messageContext
- the current message contextparameter
- the parameter to resolve to an argument. This parameter must have previously been passed to
the MethodArgumentResolver.supportsParameter(MethodParameter)
method of this interface, which must
have returned true
.null
.JAXBException
protected boolean supportsResponsePayloadReturnType(MethodParameter returnType)
AbstractPayloadMethodProcessor
ResponsePayload
, is supported.supportsResponsePayloadReturnType
in class AbstractPayloadMethodProcessor
returnType
- the method parameter to checktrue
if this resolver supports the supplied return type; false
otherwiseprotected void handleReturnValueInternal(MessageContext messageContext, MethodParameter returnType, Object returnValue) throws JAXBException
handleReturnValueInternal
in class AbstractJaxb2PayloadMethodProcessor
JAXBException