| java.lang.Object org.apache.synapse.endpoints.EndpointContext
EndpointContext | public class EndpointContext (Code) | | Keeps the states of the endpoint.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.
|
getConfigurationContext | public ConfigurationContext getConfigurationContext()(Code) | | Get the configuration context instance . This is only available for cluster env.
Returns the ConfigurationContext instance |
getRecoverOn | public long getRecoverOn()(Code) | | Time to recover a failed endpoint.
Returns time to recover a failed endpoint. |
handleException | protected void handleException(String msg)(Code) | | Helper methods for handle errors.
Parameters: msg - The error message |
handleException | protected void handleException(String msg, Exception e)(Code) | | Helper methods for handle errors.
Parameters: msg - The error message Parameters: e - The exception |
isActive | public boolean isActive()(Code) | | Checks if the endpoint is active (failed or not)
Returns true if the endpoint is active , otherwise , false will be returned |
setActive | public synchronized void setActive(boolean active)(Code) | | Sets if endpoint active or not.
Parameters: active - True for make endpoint active , false for make it inactive |
setConfigurationContext | public void setConfigurationContext(ConfigurationContext configCtx)(Code) | | Sets the ConfigurationContext instance . This is only used for cluster env.
By setting this , indicates that this is a cluster env.
Parameters: configCtx - The ConfigurationContext instance |
setContextID | public void setContextID(String contextID)(Code) | | Sets the identifier for this endpoint context , so that , this can be identified
uniquely across the cluster. The id will be the name of the endpoint
Parameters: contextID - The Id for this endpoint context |
setRecoverOn | public void setRecoverOn(long recoverOn)(Code) | | Sets time to recover a failed endpoint.
Parameters: recoverOn - The value for recover time |
|
|