org.springframework.ws.server.endpoint.adapter.method
Class AbstractPayloadSourceMethodProcessor
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.server.endpoint.adapter.method.AbstractPayloadMethodProcessor
org.springframework.ws.server.endpoint.adapter.method.AbstractPayloadSourceMethodProcessor
- All Implemented Interfaces:
- MethodArgumentResolver, MethodReturnValueHandler
- Direct Known Subclasses:
- Dom4jPayloadMethodProcessor, DomPayloadMethodProcessor, JDomPayloadMethodProcessor, SourcePayloadMethodProcessor, XomPayloadMethodProcessor
public abstract class AbstractPayloadSourceMethodProcessor
- extends AbstractPayloadMethodProcessor
Abstract base class for MethodArgumentResolver
and MethodReturnValueHandler
implementations based on
Source
s.
- Since:
- 2.0
- Author:
- Arjen Poutsma
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPayloadSourceMethodProcessor
public AbstractPayloadSourceMethodProcessor()
resolveArgument
public final Object resolveArgument(MessageContext messageContext,
MethodParameter parameter)
throws Exception
- Description copied from interface:
MethodArgumentResolver
- Resolves the given parameter into a method argument.
- Parameters:
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
.
- Returns:
- the resolved argument. May be
null
.
- Throws:
Exception
- in case of errors
resolveRequestPayloadArgument
protected abstract Object resolveRequestPayloadArgument(MethodParameter parameter,
Source requestPayload)
throws Exception
- Resolves the given parameter, annotated with
RequestPayload
, into a method argument.
- Parameters:
parameter
- the parameter to resolve to an argumentrequestPayload
- the request payload
- Returns:
- the resolved argument. May be
null
.
- Throws:
Exception
- in case of errors
handleReturnValue
public final void handleReturnValue(MessageContext messageContext,
MethodParameter returnType,
Object returnValue)
throws Exception
- Description copied from interface:
MethodReturnValueHandler
- Handles the given return value.
- Parameters:
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 handle
- Throws:
Exception
- in case of errors
createResponsePayload
protected abstract Source createResponsePayload(MethodParameter returnType,
Object returnValue)
throws Exception
- Creates a response payload for the given return value.
- Parameters:
returnType
- the return type to handlereturnValue
- the return value to handle
- Returns:
- the response payload
- Throws:
Exception
- in case of errors
Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.