public class HandlerChainProcessor extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HandlerChainProcessor.Direction |
static class |
HandlerChainProcessor.MEP |
static class |
HandlerChainProcessor.TRACKER |
Constructor and Description |
---|
HandlerChainProcessor(List<Handler> chain,
Protocol proto) |
Modifier and Type | Method and Description |
---|---|
static void |
convertToFaultMessage(MEPContext mepCtx,
Exception e,
Protocol protocol) |
static void |
convertToFaultMessage(MEPContext mepCtx,
Exception e,
Protocol protocol,
boolean checkMsg)
Converts the Exception into an XML Fault Message that is stored on the MEPContext.
|
boolean |
processChain(MEPContext mepCtx,
HandlerChainProcessor.Direction direction,
HandlerChainProcessor.MEP mep,
boolean expectResponse) |
boolean |
processChainForClose(MEPContext mepCtx,
HandlerChainProcessor.Direction direction) |
void |
processFault(MEPContext mepCtx,
HandlerChainProcessor.Direction direction) |
static void |
trackInternalCall(MessageContext mc,
HandlerChainProcessor.TRACKER tracker) |
public boolean processChain(MEPContext mepCtx, HandlerChainProcessor.Direction direction, HandlerChainProcessor.MEP mep, boolean expectResponse)
mc
- By the time processChain method is called, we already have the sorted chain,
and now we have the direction, MEP, MessageContext, and if a response is expected. We should
be able to handle everything from here, no pun intended.
Two things a user of processChain should check when the method completes:
1. Has the MessageContext.MESSAGE_OUTBOUND_PROPERTY changed, indicating reversal of message direction
2. Has the message been converted to a fault message? (indicated by a flag in the message)public boolean processChainForClose(MEPContext mepCtx, HandlerChainProcessor.Direction direction)
public void processFault(MEPContext mepCtx, HandlerChainProcessor.Direction direction)
public static void convertToFaultMessage(MEPContext mepCtx, Exception e, Protocol protocol)
public static void convertToFaultMessage(MEPContext mepCtx, Exception e, Protocol protocol, boolean checkMsg)
mepCtx
- MEPContexte
- Exceptionprotocol
- ProtocolforceConversion
- If true, the Exception is always converted to a Messagepublic static void trackInternalCall(MessageContext mc, HandlerChainProcessor.TRACKER tracker)
Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.