|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.endpoints.dispatch.DispatcherContext
public class DispatcherContext
Keeps the states of the dispatcher . This hides where those states are kept . For a cluster environment , all states are kept in the axis2 configuration context in order to replicate those states so that other synapse instance in the same cluster can see those changes . This class can be evolved to keep any run time states related to the endpoint . For a non-clustered environment , all data are kept locally.
This class provide the abstraction need to separate the dynamic data from the static data and improve the high cohesion and provides capability to replicate only required state at a given time. This improves the performance when replicate data.
| Constructor Summary | |
|---|---|
DispatcherContext()
|
|
| Method Summary | |
|---|---|
ConfigurationContext |
getConfigurationContext()
Get the configuration context instance . |
Endpoint |
getEndpoint(String sessionID)
return the endpoint for the given session. |
protected void |
handleException(String msg)
Helper methods for handle errors. |
protected void |
handleException(String msg,
Exception e)
Helper methods for handle errors. |
boolean |
isClusteringEnable()
Returns whether clustering is enable or not |
void |
removeSession(String id)
Removes the endpoint for the given session. |
void |
setConfigurationContext(ConfigurationContext configCtx)
Sets the ConfigurationContext instance . |
void |
setContextID(String contextID)
Sets the identifier for this dispatcher context , so that , this can be identified uniquely across the cluster. |
void |
setEndpoint(String sessionID,
Endpoint endpoint)
Sets the given endpoint mapping with given the session id. |
void |
setEndpoints(List<Endpoint> endpoints)
Sets the defined child endpoints |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DispatcherContext()
| Method Detail |
|---|
public Endpoint getEndpoint(String sessionID)
sessionID - The session identifier
public void setEndpoint(String sessionID,
Endpoint endpoint)
sessionID - The session identifierendpoint - The endpointpublic void removeSession(String id)
id - The session identifierpublic ConfigurationContext getConfigurationContext()
public void setConfigurationContext(ConfigurationContext configCtx)
configCtx - The ConfigurationContext instancepublic void setContextID(String contextID)
contextID - The Id for this dispatcher contextprotected void handleException(String msg)
msg - The error message
protected void handleException(String msg,
Exception e)
msg - The error messagee - The exceptionpublic boolean isClusteringEnable()
public void setEndpoints(List<Endpoint> endpoints)
endpoints - The endpoint list
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||