eneter.messaging.nodes.dispatcher
Interface IDuplexDispatcher

All Superinterfaces:
IAttachableMultipleDuplexInputChannels

public interface IDuplexDispatcher
extends IAttachableMultipleDuplexInputChannels

Dispatcher. The duplex dispatcher has attached more duplex input channels and uses more duplex output channels.
When it receives some message via the duplex input channel it forwards the message to all duplex output channels.
The duplex dispatcher allows the bidirectional communication. It means, receivers to whom the message was forwarded can send back response messages. Therefore, the sender can get response messages from all receivers.


Method Summary
 void addDuplexOutputChannel(java.lang.String channelId)
          Adds the duplex output channel id to the dispatcher.
 java.lang.String getAssociatedResponseReceiverId(java.lang.String responseReceiverId)
          Returns response receiver id of the client connected to the dispatcher.
 void removeAllDuplexOutputChannels()
          Removes all duplex output channels from the dispatcher.
 void removeDuplexOutputChannel(java.lang.String channelId)
          Removes the duplex output channel from the dispatcher.
 
Methods inherited from interface eneter.messaging.infrastructure.attachable.IAttachableMultipleDuplexInputChannels
attachDuplexInputChannel, detachDuplexInputChannel, detachDuplexInputChannel, getAttachedDuplexInputChannels, isDuplexInputChannelAttached
 

Method Detail

addDuplexOutputChannel

void addDuplexOutputChannel(java.lang.String channelId)
Adds the duplex output channel id to the dispatcher. The dispatcher will then start to forward the incoming messages also to this channel.

Parameters:
channelId -

removeDuplexOutputChannel

void removeDuplexOutputChannel(java.lang.String channelId)
                               throws java.lang.Exception
Removes the duplex output channel from the dispatcher.

Parameters:
channelId -
Throws:
java.lang.Exception

removeAllDuplexOutputChannels

void removeAllDuplexOutputChannels()
                                   throws java.lang.Exception
Removes all duplex output channels from the dispatcher.

Throws:
java.lang.Exception

getAssociatedResponseReceiverId

java.lang.String getAssociatedResponseReceiverId(java.lang.String responseReceiverId)
                                                 throws java.lang.Exception
Returns response receiver id of the client connected to the dispatcher.

Parameters:
responseReceiverId - responseRecieverId after dispatching
Returns:
responseReceiverId of the client connected to the dispatcher. Returns null if it does not exist.
Throws:
java.lang.Exception