|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.FaultHandler
org.apache.synapse.endpoints.DefaultEndpoint
public class DefaultEndpoint
This class represents an endpoint with epr as addressing to header of the message. It is responsible for sending the message to the epr specified in the message To header, performing retries if a failure occurred and informing the parent endpoint if a failure couldn't be recovered.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
|
protected static org.apache.commons.logging.Log |
trace
|
| Constructor Summary | |
|---|---|
DefaultEndpoint()
|
|
| Method Summary | |
|---|---|
EndpointDefinition |
getEndpoint()
|
String |
getName()
Returns the name of the endpoint. |
boolean |
isActive(MessageContext synMessageContext)
This will always return true, because the endpoint epr is dependent on the message being processed |
protected boolean |
isTraceOn(MessageContext msgCtx)
Should this mediator perform tracing? True if its explicitly asked to trace, or its parent has been asked to trace and it does not reject it |
protected boolean |
isTraceOrDebugOn(boolean isTraceOn)
Is tracing or debug logging on? |
void |
onChildEndpointFail(Endpoint endpoint,
MessageContext synMessageContext)
Endpoints that contain other endpoints should implement this method. |
void |
onFault(MessageContext synCtx)
This will be executed to handle any Exceptions occurred within the Synapse environment. |
void |
send(MessageContext synCtx)
Sends the message through this endpoint. |
void |
setActive(boolean active,
MessageContext synMessageContext)
since this is a virtual representation of an endpoint and the epr changes from message to message setting active state doesn't have a meaning |
void |
setEndpoint(EndpointDefinition endpoint)
|
void |
setName(String name)
Sets the name of the endpoint. |
void |
setParentEndpoint(Endpoint parentEndpoint)
Sets the parent endpoint for the current endpoint. |
protected void |
traceOrDebug(boolean traceOn,
String msg)
Perform Trace and Debug logging of a message @INFO (trace) and DEBUG (log) |
| Methods inherited from class org.apache.synapse.FaultHandler |
|---|
getStackTrace, handleFault, handleFault |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.commons.logging.Log log
protected static final org.apache.commons.logging.Log trace
| Constructor Detail |
|---|
public DefaultEndpoint()
| Method Detail |
|---|
public EndpointDefinition getEndpoint()
public void setEndpoint(EndpointDefinition endpoint)
public String getName()
Endpoint
getName in interface Endpointpublic void setName(String name)
Endpoint
setName in interface Endpointname - Name for the endpoint.public boolean isActive(MessageContext synMessageContext)
isActive in interface EndpointsynMessageContext - not being used
public void setActive(boolean active,
MessageContext synMessageContext)
setActive in interface Endpointactive - not being usedsynMessageContext - not being usedpublic void send(MessageContext synCtx)
send in interface EndpointsynCtx - MessageContext sent by client to Synapse
public void onChildEndpointFail(Endpoint endpoint,
MessageContext synMessageContext)
Endpoint
onChildEndpointFail in interface Endpointendpoint - The child endpoint which caused the exception.synMessageContext - MessageContext that was used in the failed attempt.public void setParentEndpoint(Endpoint parentEndpoint)
Endpoint
setParentEndpoint in interface EndpointparentEndpoint - parent endpoint containing this endpoint. It should handle the onChildEndpointFail(...)
callback.public void onFault(MessageContext synCtx)
FaultHandler
onFault in class FaultHandlersynCtx - SynapseMessageContext of which the fault occured message comprisesprotected boolean isTraceOn(MessageContext msgCtx)
msgCtx - the current message
protected boolean isTraceOrDebugOn(boolean isTraceOn)
isTraceOn - is tracing known to be on?
protected void traceOrDebug(boolean traceOn,
String msg)
traceOn - is runtime trace on for this message?msg - the message to log/trace
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||