eneter.messaging.nodes.loadbalancer
Interface ILoadBalancer

All Superinterfaces:
IAttachableDuplexInputChannel

public interface ILoadBalancer
extends IAttachableDuplexInputChannel

Load balancer. The load balancer maintains a list of receivers processing a certain request. When the balancer receives the request, it chooses which receiver shall process it, so that all receivers are loaded optimally.


Method Summary
 void addDuplexOutputChannel(java.lang.String channelId)
          Adds the request receiver to the load balancer.
 void removeAllDuplexOutputChannels()
          Removes all request receiers from the load balanacer.
 void removeDuplexOutputChannel(java.lang.String channelId)
          Removes the request receiver from the load balancer.
 Event<ResponseReceiverEventArgs> responseReceiverConnected()
          The event is invoked when the client sending requests was connected to the load balancer.
 Event<ResponseReceiverEventArgs> responseReceiverDisconnected()
          The event is invoked when the client sending requests was disconnected from the load balanacer.
 
Methods inherited from interface eneter.messaging.infrastructure.attachable.IAttachableDuplexInputChannel
attachDuplexInputChannel, detachDuplexInputChannel, getAttachedDuplexInputChannel, isDuplexInputChannelAttached
 

Method Detail

responseReceiverConnected

Event<ResponseReceiverEventArgs> responseReceiverConnected()
The event is invoked when the client sending requests was connected to the load balancer.

Returns:

responseReceiverDisconnected

Event<ResponseReceiverEventArgs> responseReceiverDisconnected()
The event is invoked when the client sending requests was disconnected from the load balanacer.

Returns:

addDuplexOutputChannel

void addDuplexOutputChannel(java.lang.String channelId)
                            throws java.lang.Exception
Adds the request receiver to the load balancer.

Parameters:
channelId - channel id (address) of the receiver processing requests.
Throws:
java.lang.Exception

removeDuplexOutputChannel

void removeDuplexOutputChannel(java.lang.String channelId)
                               throws java.lang.Exception
Removes the request receiver from the load balancer.

Parameters:
channelId - channel id (address) of the receiver processing requests.
Throws:
java.lang.Exception

removeAllDuplexOutputChannels

void removeAllDuplexOutputChannels()
Removes all request receiers from the load balanacer.