public class EndpointContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
EndpointContext(java.lang.String endpointName,
EndpointDefinition endpointDefinition,
boolean clustered,
org.apache.axis2.context.ConfigurationContext cfgCtx,
EndpointView metricsBean)
Create an EndpointContext to hold runtime state of an Endpoint
|
Modifier and Type | Method and Description |
---|---|
boolean |
isMaxRetryLimitReached()
Check whether the endpoint has exceed the maximum retry limit on failover
|
boolean |
isState(int s) |
void |
onFailoverRetryLimit()
Endpoint has exceeded the maximum retry attempts on failover
|
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.
|
java.lang.String |
toString() |
public static final int ST_ACTIVE
public static final int ST_TIMEOUT
public static final int ST_SUSPENDED
public static final int ST_OFF
public EndpointContext(java.lang.String endpointName, EndpointDefinition endpointDefinition, boolean clustered, org.apache.axis2.context.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 clusteringpublic void onSuccess()
public void onFault()
public void onTimeout()
public boolean readyToSend()
public void switchOff()
public void switchOn()
public boolean isState(int s)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isMaxRetryLimitReached()
public void onFailoverRetryLimit()
Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.