javax.servlet.sip.ar
Class SipApplicationRouterInfo

java.lang.Object
  extended by javax.servlet.sip.ar.SipApplicationRouterInfo

public class SipApplicationRouterInfo
extends java.lang.Object

The SipApplicationRouterInfo class encapsulates the different pieces of information that the application router returns to the container when the container calls the SipApplicationRouter.getNextApplication() method.

Since:
1.1

Constructor Summary
SipApplicationRouterInfo(java.lang.String nextApplicationName, SipApplicationRoutingRegion routingRegion, java.lang.String subscriberURI, java.lang.String[] routes, SipRouteModifier mod, java.io.Serializable stateInfo)
          Creates a SipApplicationRouterInfo object containing the information necessary for the conatiner to perform its routing decision.
 
Method Summary
 java.lang.String getNextApplicationName()
           
 SipRouteModifier getRouteModifier()
           
 java.lang.String[] getRoutes()
          An array of SIP routes of the same type (internal or external).
 SipApplicationRoutingRegion getRoutingRegion()
           
 java.io.Serializable getStateInfo()
           
 java.lang.String getSubscriberURI()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SipApplicationRouterInfo

public SipApplicationRouterInfo(java.lang.String nextApplicationName,
                                SipApplicationRoutingRegion routingRegion,
                                java.lang.String subscriberURI,
                                java.lang.String[] routes,
                                SipRouteModifier mod,
                                java.io.Serializable stateInfo)
Creates a SipApplicationRouterInfo object containing the information necessary for the conatiner to perform its routing decision.

Parameters:
nextApplicationName - The name of the application that the application router selects to service this request. If no further application is needed in the current region, this is set to null.
routingRegion - The Routing region in which the application that is selected will serve.
subscriberURI - The URI that the application is selected to serve
routes - array of external routes or an internal route. External routes are pushed onto the request by the container, internal route is used by SipServletRequest.getPoppedRoute().
mod - An enum modifier which qualifies the routes returned and the router behavior
stateInfo - Arbitrary state information of the application router that it wishes the container to store on its behalf
Method Detail

getNextApplicationName

public java.lang.String getNextApplicationName()
Returns:
name of next application selected. If the top route is external then this returns null.

getRoutes

public java.lang.String[] getRoutes()
An array of SIP routes of the same type (internal or external). If the top (first) is external, they are to be used by the container to route the request to the external entities. The container pushes the external routes onto the request by iterating over the array starting with the last element until the top (first) element, inclusive.
If the top (first) route is internal, it indicates the route which led the request to the container. This internal route is not used for any routing purposes but to let application router potentially modify the route popped by the container. Only the first internal route from the array is used for this purpose, the rest (if any) are ignored by the container.

Returns:
The SIP route headers which could be internal or external. An empty array is returned when no routes are present.

getStateInfo

public java.io.Serializable getStateInfo()
Returns:
router state information

getSubscriberURI

public java.lang.String getSubscriberURI()
Returns:
URI of the subscriber whom the next application is selected to serve. If the top route is external then this returns a null.

getRoutingRegion

public SipApplicationRoutingRegion getRoutingRegion()
Returns:
Routing region in which the next application is selected to serve. If the top route is external then this returns a null.

getRouteModifier

public SipRouteModifier getRouteModifier()
Returns:
The enum SipRouteModifier associated with the router info.