|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.synapse.FaultHandler
public abstract class FaultHandler
This is an abstract class that handles an unexpected error during Synapse mediation, but looking at the stack of registered FaultHanders and invoking on them as appropriate. Sequences and Endpoints would be Synapse entities that handles faults. If such an entity is unable to handle an error condition, then a SynapseException should be thrown, which triggers this fault handling logic.
Constructor Summary | |
---|---|
FaultHandler()
|
Method Summary | |
---|---|
static String |
getStackTrace(Throwable aThrowable)
Get the stack trace into a String |
void |
handleFault(MessageContext synCtx)
|
void |
handleFault(MessageContext synCtx,
Exception e)
Extract and set ERROR_MESSAGE and ERROR_DETAIL to the message context from the Exception |
abstract void |
onFault(MessageContext synCtx)
This will be executed to handle any Exceptions occurred within the Synapse environment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FaultHandler()
Method Detail |
---|
public void handleFault(MessageContext synCtx)
public void handleFault(MessageContext synCtx, Exception e)
synCtx
- the message contexte
- the exception encounteredpublic abstract void onFault(MessageContext synCtx)
synCtx
- SynapseMessageContext of which the fault occured message comprises
SynapseException
- in case there is a failure in the fault executionpublic static String getStackTrace(Throwable aThrowable)
aThrowable
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |