org.smslib.routing
Class ARouter
java.lang.Object
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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ARouter
public ARouter()
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 routedgateways
- 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 routedgateways
- 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
(c) 2002-2011, http://smslib.org