public class EndpointInterceptorAdapter extends Object implements EndpointInterceptor
EndpointInterceptor
interface, for simplified implementation of
pre-only/post-only interceptors.Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses
|
Constructor and Description |
---|
EndpointInterceptorAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
afterCompletion(MessageContext messageContext,
Object endpoint,
Exception ex)
Does nothing by default.
|
boolean |
handleFault(MessageContext messageContext,
Object endpoint)
Returns
true . |
boolean |
handleRequest(MessageContext messageContext,
Object endpoint)
Returns
true . |
boolean |
handleResponse(MessageContext messageContext,
Object endpoint)
Returns
true . |
boolean |
understands(Element header)
Returns
false . |
protected final org.apache.commons.logging.Log logger
public boolean understands(Element header)
false
.public boolean handleRequest(MessageContext messageContext, Object endpoint) throws Exception
true
.handleRequest
in interface EndpointInterceptor
messageContext
- contains the incoming request messageendpoint
- chosen endpoint to invoketrue
Exception
- in case of errorsMessageContext.getRequest()
public boolean handleResponse(MessageContext messageContext, Object endpoint) throws Exception
true
.handleResponse
in interface EndpointInterceptor
messageContext
- contains both request and response messagesendpoint
- chosen endpoint to invoketrue
Exception
- in case of errorsMessageContext.getRequest()
,
MessageContext.hasResponse()
,
MessageContext.getResponse()
public boolean handleFault(MessageContext messageContext, Object endpoint) throws Exception
true
.handleFault
in interface EndpointInterceptor
messageContext
- contains both request and response messages, the response should contains a Faultendpoint
- chosen endpoint to invoketrue
Exception
public void afterCompletion(MessageContext messageContext, Object endpoint, Exception ex) throws Exception
afterCompletion
in interface EndpointInterceptor
messageContext
- contains both request and response messages, the response should contains a Faultendpoint
- chosen endpoint to invokeex
- exception thrown on handler execution, if anyException
- in case of errorsCopyright © 2020 Pivotal Software. All rights reserved.