Interface MethodReturnValueHandler
- All Known Implementing Classes:
AbstractJaxb2PayloadMethodProcessor
,AbstractPayloadMethodProcessor
,AbstractPayloadSourceMethodProcessor
,Dom4jPayloadMethodProcessor
,DomPayloadMethodProcessor
,JaxbElementPayloadMethodProcessor
,JDomPayloadMethodProcessor
,MarshallingPayloadMethodProcessor
,SourcePayloadMethodProcessor
,XmlRootElementPayloadMethodProcessor
,XomPayloadMethodProcessor
public interface MethodReturnValueHandler
Strategy interface used to handle method return values. This interface is used to allow
the
DefaultMethodEndpointAdapter
to be indefinitely extensible.- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleReturnValue
(MessageContext messageContext, org.springframework.core.MethodParameter returnType, Object returnValue) Handles the given return value.boolean
supportsReturnType
(org.springframework.core.MethodParameter returnType) Indicates whether the given method return type is supported by this handler.
-
Method Details
-
supportsReturnType
boolean supportsReturnType(org.springframework.core.MethodParameter returnType) Indicates whether the given method return type is supported by this handler.- Parameters:
returnType
- the method return type to check- Returns:
true
if this handler supports the supplied return type;false
otherwise
-
handleReturnValue
void handleReturnValue(MessageContext messageContext, org.springframework.core.MethodParameter returnType, Object returnValue) throws Exception Handles the given return value.- Parameters:
messageContext
- the current message contextreturnType
- the return type to handle. This type must have previously been passed to thesupportsReturnType(MethodParameter)
method of this interface, which must have returnedtrue
.returnValue
- the return value to handle- Throws:
Exception
- in case of errors
-