org.apache.synapse.core.axis2
Class SynapseCallbackReceiver
java.lang.Object
org.apache.synapse.core.axis2.SynapseCallbackReceiver
- All Implemented Interfaces:
- MessageReceiver
public class SynapseCallbackReceiver
- extends Object
- implements MessageReceiver
This is the message receiver that receives the responses for outgoing messages sent out
by Synapse. It holds a callbackStore that maps the [unique] messageID of each message to
a callback object that gets executed on timeout or when a response is received (before timeout)
The AnonymousServiceFactory uses this MessageReceiver for all Anonymous services created by it.
This however - effectively - is a singleton class
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SynapseCallbackReceiver
public SynapseCallbackReceiver(SynapseConfiguration synCfg,
ServerContextInformation contextInformation)
- Create the *single* instance of this class that would be used by all anonymous services
used for outgoing messaging.
- Parameters:
synCfg
- the Synapse configurationcontextInformation
- server runtime information
getCallbackCount
public int getCallbackCount()
addCallback
public void addCallback(String MsgID,
AxisCallback callback)
receive
public void receive(MessageContext messageCtx)
throws AxisFault
- Everytime a response message is received this method gets invoked. It will then select
the outgoing *Synapse* message context for the reply we received, and determine what action
to take at the Synapse level
- Specified by:
receive
in interface MessageReceiver
- Parameters:
messageCtx
- the Axis2 message context of the reply received
- Throws:
AxisFault
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.