public class SourcePayloadMethodProcessor extends AbstractPayloadSourceMethodProcessor
logger
Constructor and Description |
---|
SourcePayloadMethodProcessor() |
Modifier and Type | Method and Description |
---|---|
protected Source |
createResponsePayload(org.springframework.core.MethodParameter returnType,
Object returnValue)
Creates a response payload for the given return value.
|
protected XMLInputFactory |
createXmlInputFactory()
Create a
XMLInputFactory that this resolver will use to create XMLStreamReader
and XMLEventReader objects. |
protected Source |
resolveRequestPayloadArgument(org.springframework.core.MethodParameter parameter,
Source requestPayload)
Resolves the given parameter, annotated with
RequestPayload , into a method argument. |
protected boolean |
supportsRequestPayloadParameter(org.springframework.core.MethodParameter parameter)
Indicates whether the given method parameter, annotated with
RequestPayload ,
is supported by this resolver. |
protected boolean |
supportsResponsePayloadReturnType(org.springframework.core.MethodParameter returnType)
Indicates whether the given method return type, annotated with
ResponsePayload , is supported. |
handleReturnValue, resolveArgument
convertToByteArrayInputStream, supportsParameter, supportsReturnType
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
protected boolean supportsRequestPayloadParameter(org.springframework.core.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
otherwiseprotected Source resolveRequestPayloadArgument(org.springframework.core.MethodParameter parameter, Source requestPayload) throws Exception
AbstractPayloadSourceMethodProcessor
RequestPayload
, into a method argument.resolveRequestPayloadArgument
in class AbstractPayloadSourceMethodProcessor
parameter
- the parameter to resolve to an argumentrequestPayload
- the request payloadnull
.Exception
- in case of errorsprotected boolean supportsResponsePayloadReturnType(org.springframework.core.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 Source createResponsePayload(org.springframework.core.MethodParameter returnType, Object returnValue)
AbstractPayloadSourceMethodProcessor
createResponsePayload
in class AbstractPayloadSourceMethodProcessor
returnType
- the return type to handlereturnValue
- the return value to handleprotected XMLInputFactory createXmlInputFactory()
XMLInputFactory
that this resolver will use to create XMLStreamReader
and XMLEventReader
objects.
Can be overridden in subclasses, adding further initialization of the factory. The resulting factory is cached, so this method will only be called once.
Copyright © 2020 Pivotal Software. All rights reserved.