public abstract class AbstractPayloadSourceMethodProcessor extends AbstractPayloadMethodProcessor
MethodArgumentResolver
and MethodReturnValueHandler
implementations based on
Source
s.logger
Constructor and Description |
---|
AbstractPayloadSourceMethodProcessor() |
Modifier and Type | Method and Description |
---|---|
protected abstract Source |
createResponsePayload(org.springframework.core.MethodParameter returnType,
Object returnValue)
Creates a response payload for the given return value.
|
void |
handleReturnValue(MessageContext messageContext,
org.springframework.core.MethodParameter returnType,
Object returnValue)
Handles the given return value.
|
Object |
resolveArgument(MessageContext messageContext,
org.springframework.core.MethodParameter parameter)
Resolves the given parameter into a method argument.
|
protected abstract Object |
resolveRequestPayloadArgument(org.springframework.core.MethodParameter parameter,
Source requestPayload)
Resolves the given parameter, annotated with
RequestPayload , into a method argument. |
convertToByteArrayInputStream, supportsParameter, supportsRequestPayloadParameter, supportsResponsePayloadReturnType, supportsReturnType
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
public AbstractPayloadSourceMethodProcessor()
public final Object resolveArgument(MessageContext messageContext, org.springframework.core.MethodParameter parameter) throws Exception
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
.Exception
- in case of errorsprotected abstract Object resolveRequestPayloadArgument(org.springframework.core.MethodParameter parameter, Source requestPayload) throws Exception
RequestPayload
, into a method argument.parameter
- the parameter to resolve to an argumentrequestPayload
- the request payloadnull
.Exception
- in case of errorspublic final void handleReturnValue(MessageContext messageContext, org.springframework.core.MethodParameter returnType, Object returnValue) throws Exception
MethodReturnValueHandler
messageContext
- the current message contextreturnType
- the return type to handle. This type must have previously been passed to the MethodReturnValueHandler.supportsReturnType(MethodParameter)
method of this interface, which must have returned
true
.returnValue
- the return value to handleException
- in case of errorsprotected abstract Source createResponsePayload(org.springframework.core.MethodParameter returnType, Object returnValue) throws Exception
returnType
- the return type to handlereturnValue
- the return value to handleException
- in case of errorsCopyright © 2020 Pivotal Software. All rights reserved.