|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.synapse.endpoints.EndpointContext
public class EndpointContext
This class is one of the key classes of the Endpoint management in Synapse. It maintains the runtime state of an endpoint for local and clustered endpoint configurations.
Field Summary | |
---|---|
static int |
ST_ACTIVE
And active endpoint known to be functioning properly |
static int |
ST_OFF
An endpoint manually switched off into maintenance - it will never change state automatically |
static int |
ST_SUSPENDED
An endpoint put into the suspended state by the system. |
static int |
ST_TIMEOUT
An endpoint which timed out - but now maybe ready to retry depending on the current time |
Constructor Summary | |
---|---|
EndpointContext(String endpointName,
EndpointDefinition endpointDefinition,
boolean clustered,
ConfigurationContext cfgCtx,
EndpointView metricsBean)
Create an EndpointContext to hold runtime state of an Endpoint |
Method Summary | |
---|---|
boolean |
isState(int s)
|
void |
onFault()
Endpoint failed processing a message |
void |
onSuccess()
Endpoint has processed a message successfully |
void |
onTimeout()
Endpoint timeout processing a message |
boolean |
readyToSend()
Checks if the endpoint is in the state ST_ACTIVE. |
void |
switchOff()
Manually turn off this endpoint (e.g. |
void |
switchOn()
Activate this endpoint manually (i.e. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ST_ACTIVE
public static final int ST_TIMEOUT
public static final int ST_SUSPENDED
public static final int ST_OFF
Constructor Detail |
---|
public EndpointContext(String endpointName, EndpointDefinition endpointDefinition, boolean clustered, ConfigurationContext cfgCtx, EndpointView metricsBean)
endpointName
- the name of the endpoint (mainly for logging)endpointDefinition
- the definition of the endpoint
(e.g. retry time, suspend duration..)clustered
- is the environment clustered?cfgCtx
- the Axis2 configurationContext for clusteringMethod Detail |
---|
public void onSuccess()
public void onFault()
public void onTimeout()
public boolean readyToSend()
public void switchOff()
public void switchOn()
public boolean isState(int s)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |