org.echarts.servlet.sip.appRouter.DFCRouterImpl
Class RouteSet

java.lang.Object
  extended by org.echarts.servlet.sip.appRouter.DFCRouterImpl.RouteSet

public class RouteSet
extends java.lang.Object

The RouteSet class represents a mapping between a particular address and the corresponding ordered set of applications to which the address subscribes. Not to be confused with SubscriptionRules that are part of the static router configuration, a RouteSet object is built dynamically by the DFC application router by comparing an address found in an initial request with the subscription rules associated with the current routing region. This process allows the router implementation to arrive at a set of applications subscribed to by the address. The set of applications is then ordered according to the application precedence rules for the region.

Author:
khp
See Also:
SubscriptionRules

Constructor Summary
RouteSet(Address address)
          Initialize a route set.
 
Method Summary
 void buildRouteSet()
          Build an ordered set of applications that subscribe to the address initialized in the constructor.
 Application getNextApplication()
          Get the top application from the route set.
 java.util.Vector<Application> getRouteSet()
          Get the route set associated with the associated address.
 void popNextApplication()
          Pop next application object from top of route set.
 void setRouteSetSuffix(Application application)
          Get the suffix route set consisting of the applications in the route set after the indicated application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouteSet

public RouteSet(Address address)
Initialize a route set.

Parameters:
address - abstract address from which this route set will be built. Note that this constructor does very little. The real construction of the route set is accomplished in the buildRouteSet method.
See Also:
buildRouteSet()
Method Detail

buildRouteSet

public void buildRouteSet()
Build an ordered set of applications that subscribe to the address initialized in the constructor. In the current implementation, the address must be an instance of either an originating or terminating address. Proceed by attempting to match the address with the address patterns contained in subscription rules. When the address matches a subscription address pattern, add the applications associated with the subscription in the order prescribed by the precedence rules.


getRouteSet

public java.util.Vector<Application> getRouteSet()
Get the route set associated with the associated address.

Returns:
vector of Application objects

setRouteSetSuffix

public void setRouteSetSuffix(Application application)
Get the suffix route set consisting of the applications in the route set after the indicated application.


getNextApplication

public Application getNextApplication()
Get the top application from the route set. This method does not pop the application from the top.

Returns:
application object if route set is non-empty, else null
See Also:
popNextApplication()

popNextApplication

public void popNextApplication()
Pop next application object from top of route set. Do nothing if the route set is empty.