| org.springframework.ws.server.EndpointInterceptor
All known Subclasses: org.springframework.ws.server.endpoint.interceptor.PayloadTransformingInterceptor, org.springframework.ws.server.endpoint.interceptor.AbstractValidatingInterceptor, org.springframework.ws.server.endpoint.AbstractLoggingInterceptor, org.springframework.ws.server.endpoint.interceptor.EndpointInterceptorAdapter,
EndpointInterceptor | public interface EndpointInterceptor (Code) | | Workflow interface that allows for customized endpoint invocation chains. Applications can register any number of
existing or custom interceptors for certain groups of endpoints, to add common preprocessing behavior without needing
to modify each endpoint implementation.
A EndpointInterceptor gets called before the appropriate
EndpointAdapter triggers the invocation
of the endpoint itself. This mechanism can be used for a large field of preprocessing aspects, e.g. for authorization
checks, or message header checks. Its main purpose is to allow for factoring out repetitive endpoint code.
Typically an interceptor chain is defined per
EndpointMapping bean, sharing its granularity. To be able to
apply a certain interceptor chain to a group of handlers, one needs to map the desired handlers via one
EndpointMapping bean.The interceptors themselves are defined as beans in the application context,
referenced by the mapping bean definition via its interceptors property (in XML: a <list> of
<ref>).
author: Arjen Poutsma See Also: EndpointInvocationChain.getInterceptors See Also: org.springframework.ws.server.endpoint.interceptor.EndpointInterceptorAdapter See Also: org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping.setInterceptors(EndpointInterceptor[]) since: 1.0.0 |
handleFault | boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception(Code) | | Processes the outgoing response fault. Called after
EndpointAdapter actually invoked the endpoint. Can
manipulate the response, if any, by adding new headers, etc.
MessageDispatcher processes an endpoint in an invocation chain, consisting of any number of interceptors,
with the endpoint itself at the end. With this method, each interceptor can post-process an invocation, getting
applied in inverse order of the execution chain.
Note: Will only be called if this interceptor's
EndpointInterceptor.handleRequest method has successfully completed.
Parameters: messageContext - contains both request and response messages, the response should contains a Fault Parameters: endpoint - chosen endpoint to invoke true to continue processing of the reponse interceptor chain; false to indicateblocking of the response handler chain. |
handleRequest | boolean handleRequest(MessageContext messageContext, Object endpoint) throws Exception(Code) | | Processes the incoming request message. Called after
EndpointMapping determined an appropriate endpoint
object, but before
EndpointAdapter invokes the endpoint.
MessageDispatcher processes an endpoint in an invocation chain, consisting of any number of interceptors,
with the endpoint itself at the end. With this method, each interceptor can decide to abort the chain, typically
creating a custom response.
Parameters: messageContext - contains the incoming request message Parameters: endpoint - chosen endpoint to invoke true to continue processing of the request interceptor chain; false to indicateblocking of the request endpoint chain, without invoking the endpoint throws: Exception - in case of errors See Also: org.springframework.ws.context.MessageContext.getRequest |
|
|