Home » synapse-1.2-src » org.apache.synapse.endpoints.dispatch » [javadoc | source]
org.apache.synapse.endpoints.dispatch
public interface: Dispatcher [javadoc | source]

All Known Implementing Classes:
    SimpleClientSessionDispatcher, SoapSessionDispatcher, HttpSessionDispatcher

Defines the behavior of session dispatchers. There can be two dispatcher types. Server initiated session dispatchers and client initiated session dispatchers. In the former one, server generates the session ID and sends it to the client in the first RESPONSE. In the later case, client should generate the session ID and send it to the server in the first REQUEST. A dispatcher object will be created for each session affinity load balance endpoint.
Method from org.apache.synapse.endpoints.dispatch.Dispatcher Summary:
getEndpoint,   isServerInitiatedSession,   unbind,   updateSession
Method from org.apache.synapse.endpoints.dispatch.Dispatcher Detail:
 public Endpoint getEndpoint(MessageContext synCtx,
    DispatcherContext dispatcherContext)
    Dispatcher should check the session id pattern in the synapseMessageContext and return the matching endpoint for that session id, if available. If the session id in the given synapseMessageContext is not found it should return null.
 public boolean isServerInitiatedSession()
    Determine whether the session supported by the implementing dispatcher is initiated by the server (e.g. soap session) or by the client. This can be used for optimizing session updates.
 public  void unbind(MessageContext synCtx,
    DispatcherContext dispatcherContext)
    Removes the session belonging to the given message context.
 public  void updateSession(MessageContext synCtx,
    DispatcherContext dispatcherContext,
    Endpoint endpoint)
    Updates the session maps. This will be called in the first client -> synapse -> server flow for client initiated sessions. For server initiated sessions, this will be called in the first server -> synapse -> client flow.