Package org.apache.synapse.core.axis2
Class AsyncCallback
- java.lang.Object
-
- org.apache.synapse.core.axis2.AsyncCallback
-
- All Implemented Interfaces:
org.apache.axis2.client.async.AxisCallback
public class AsyncCallback extends Object implements org.apache.axis2.client.async.AxisCallback
This class only "holds" the Synapse out message context for the Synapse callback message receiver when a response is received or error is encountered
-
-
Constructor Summary
Constructors Constructor Description AsyncCallback(org.apache.axis2.context.MessageContext messageContext, MessageContext synapseOutMsgCtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.axis2.context.MessageContextgetAxis2OutMsgCtx()MessageContextgetSynapseOutMsgCtx()intgetTimeOutAction()longgetTimeoutDuration()longgetTimeOutOn()SynapseConstants.ENDPOINT_TIMEOUT_TYPEgetTimeoutType()booleanisMarkedForRemoval()Check whether callback is marked for removal from the callback storevoidonComplete()voidonError(Exception e)voidonFault(org.apache.axis2.context.MessageContext messageContext)voidonMessage(org.apache.axis2.context.MessageContext messageContext)voidsetMarkedForRemoval()Mark callback to be removed from the callback storevoidsetTimeout(long timeoutDuration)voidsetTimeOutAction(int timeOutAction)voidsetTimeoutType(SynapseConstants.ENDPOINT_TIMEOUT_TYPE timeoutType)
-
-
-
Constructor Detail
-
AsyncCallback
public AsyncCallback(org.apache.axis2.context.MessageContext messageContext, MessageContext synapseOutMsgCtx)
-
-
Method Detail
-
onMessage
public void onMessage(org.apache.axis2.context.MessageContext messageContext)
- Specified by:
onMessagein interfaceorg.apache.axis2.client.async.AxisCallback
-
onFault
public void onFault(org.apache.axis2.context.MessageContext messageContext)
- Specified by:
onFaultin interfaceorg.apache.axis2.client.async.AxisCallback
-
onError
public void onError(Exception e)
- Specified by:
onErrorin interfaceorg.apache.axis2.client.async.AxisCallback
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceorg.apache.axis2.client.async.AxisCallback
-
getSynapseOutMsgCtx
public MessageContext getSynapseOutMsgCtx()
-
getAxis2OutMsgCtx
public org.apache.axis2.context.MessageContext getAxis2OutMsgCtx()
-
getTimeOutOn
public long getTimeOutOn()
-
getTimeoutDuration
public long getTimeoutDuration()
-
setTimeout
public void setTimeout(long timeoutDuration)
-
getTimeOutAction
public int getTimeOutAction()
-
setTimeOutAction
public void setTimeOutAction(int timeOutAction)
-
getTimeoutType
public SynapseConstants.ENDPOINT_TIMEOUT_TYPE getTimeoutType()
-
setTimeoutType
public void setTimeoutType(SynapseConstants.ENDPOINT_TIMEOUT_TYPE timeoutType)
-
isMarkedForRemoval
public boolean isMarkedForRemoval()
Check whether callback is marked for removal from the callback store- Returns:
- whether callback is marked for removal from the callback store
-
setMarkedForRemoval
public void setMarkedForRemoval()
Mark callback to be removed from the callback store
-
-