SMSLib 3.5.3

org.smslib.routing
Class ARouter

java.lang.Object
  extended by org.smslib.routing.ARouter
Direct Known Subclasses:
DefaultRouter

public abstract class ARouter
extends java.lang.Object

Base class for all possible Router implementations.

Author:
Bassam Al-Sarori

Constructor Summary
ARouter()
           
 
Method Summary
abstract  java.util.Collection<AGateway> customRoute(OutboundMessage msg, java.util.Collection<AGateway> gateways)
          Performs custom routing.
 java.util.Collection<AGateway> route(OutboundMessage msg, java.util.Collection<AGateway> gateways)
          Performs basic routing.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ARouter

public ARouter()
Method Detail

route

public java.util.Collection<AGateway> route(OutboundMessage msg,
                                            java.util.Collection<AGateway> gateways)
Performs basic routing. Selects gateways that are able to outbound messages and are started. If gatewayId is specified in msg then only gateways with matching ids are selected. Before returning, the message and selected gateways are passed to customRoute method.

Parameters:
msg - message to be routed
gateways - a collection of gateways that will used for selecting appropriate gateways for routing.
Returns:
a collection of gateways that this msg should be routed through

customRoute

public abstract java.util.Collection<AGateway> customRoute(OutboundMessage msg,
                                                           java.util.Collection<AGateway> gateways)
Performs custom routing.

Parameters:
msg - message to be routed
gateways - a collection of gateways that will used for selecting appropriate gateways for routing.
Returns:
a collection of gateways that this msg should be routed through

SMSLib 3.5.3

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