Home » synapse-1.2-src » org.apache.synapse.endpoints » [javadoc | source]
org.apache.synapse.endpoints
public class: DefaultEndpoint [javadoc | source]
java.lang.Object
   org.apache.synapse.FaultHandler
      org.apache.synapse.endpoints.DefaultEndpoint

All Implemented Interfaces:
    Endpoint

Direct Known Subclasses:
    AddressEndpoint

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  Log log     
protected static final  Log trace     
Constructor:
 public DefaultEndpoint() 
Method from org.apache.synapse.endpoints.DefaultEndpoint Summary:
getEndpoint,   getName,   isActive,   isTraceOn,   isTraceOrDebugOn,   onChildEndpointFail,   onFault,   send,   setActive,   setEndpoint,   setName,   setParentEndpoint,   traceOrDebug
Methods from org.apache.synapse.FaultHandler:
getStackTrace,   handleFault,   handleFault,   onFault
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.synapse.endpoints.DefaultEndpoint Detail:
 public EndpointDefinition getEndpoint() 
 public String getName() 
 public 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?
 public  void onChildEndpointFail(Endpoint endpoint,
    MessageContext synMessageContext) 
 public  void onFault(MessageContext synCtx) 
 public  void send(MessageContext synCtx) 
    Sends the message through this endpoint. This method just handles statistics related functions and gives the message to the Synapse environment to send. It does not add any endpoint specific details to the message context. These details are added only to the cloned message context by the Axis2FlexibleMepClient. So that we can reuse the original message context for resending through different endpoints.
 public synchronized  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
 public  void setEndpoint(EndpointDefinition endpoint) 
 public  void setName(String name) 
 public  void setParentEndpoint(Endpoint parentEndpoint) 
 protected  void traceOrDebug(boolean traceOn,
    String msg) 
    Perform Trace and Debug logging of a message @INFO (trace) and DEBUG (log)