SMSLib 3.5.3

org.smslib.balancing
Class LoadBalancer

java.lang.Object
  extended by org.smslib.balancing.LoadBalancer
Direct Known Subclasses:
RoundRobinLoadBalancer

public class LoadBalancer
extends java.lang.Object

Load Balancing base class. Implements default trivial Load Balancing - just picking first available Gateway to send message. Create subclasses to implement custom functionality.

Author:
Tomek Cejner

Constructor Summary
LoadBalancer()
           
 
Method Summary
 AGateway balance(OutboundMessage msg, java.util.Collection<AGateway> candidates)
          Core of Load Balancing.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadBalancer

public LoadBalancer()
Method Detail

balance

public AGateway balance(OutboundMessage msg,
                        java.util.Collection<AGateway> candidates)
Core of Load Balancing. Default is trivial selection of first candidate.

Parameters:
msg - Message to be sent.
candidates - List of candidate gateways to choose from

SMSLib 3.5.3

(c) 2002-2011, http://smslib.org