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

java.lang.Object
  extended by org.echarts.servlet.sip.appRouter.DFCRouterImpl.SipApplicationDFCRouterImpl
All Implemented Interfaces:
SipApplicationRouter

public class SipApplicationDFCRouterImpl
extends java.lang.Object
implements SipApplicationRouter

This class is the top level class that constitutes the Distributed Feature Composition (DFC) Application Router implementation. Like all application router implementations, it implements the SipApplicationRouter interface. There should only be one DFC application router implementation per container instance.

See Also:
org.echarts.servlet.sip.appRouter.SipApplicationRouter

Constructor Summary
SipApplicationDFCRouterImpl()
           
 
Method Summary
 void applicationDeployed(java.util.List<java.lang.String> newlyDeployedApplicationNames)
          This method is used by the container to notify the application router that applications have been undeployed.
 void applicationUndeployed(java.util.List<java.lang.String> undeployedApplicationNames)
          This method is used by the container to notify the application router that new applications have been deployed.
 void configurationChanged(java.io.InputStream configInputStream)
           
 void destroy()
          The container calls this method when it finishes using the application router.
 SipApplicationRouterInfo getNextApplication(SipServletRequest initialRequest, SipApplicationRoutingRegion region, SipApplicationRoutingDirective directive, SipTargetedRequestInfo targetedRequestInfo, java.io.Serializable stateInfo)
          This method is called by the container (adaptation layer) when a servlet sends or proxies an initial SipServletRequest.
 void init()
          Initializes the application router
 void init(java.util.List<java.lang.String> deployedApplicationNames)
          Initializes the application router providing a list of the currently deployed applications.
 void init(java.util.Properties properties)
          Initialize the implementation from a Properties object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SipApplicationDFCRouterImpl

public SipApplicationDFCRouterImpl()
Method Detail

applicationUndeployed

public void applicationUndeployed(java.util.List<java.lang.String> undeployedApplicationNames)
This method is used by the container to notify the application router that new applications have been deployed.

Specified by:
applicationUndeployed in interface SipApplicationRouter
Parameters:
undeployedApplicationNames - the list of undeployed application names

applicationDeployed

public void applicationDeployed(java.util.List<java.lang.String> newlyDeployedApplicationNames)
This method is used by the container to notify the application router that applications have been undeployed.

Specified by:
applicationDeployed in interface SipApplicationRouter
Parameters:
newlyDeployedApplicationNames - the list of newly deployed application names

destroy

public void destroy()
The container calls this method when it finishes using the application router.

Specified by:
destroy in interface SipApplicationRouter

init

public void init(java.util.Properties properties)
Initialize the implementation from a Properties object. Currently, the only property to be set is a router configuration file name. This file is XML based and defines application precedence rules and application subscription mappings.

Specified by:
init in interface SipApplicationRouter
Parameters:
properties - Properties object to be used in initialization
See Also:
RouterConfiguration

init

public void init()
Initializes the application router

Specified by:
init in interface SipApplicationRouter

init

public void init(java.util.List<java.lang.String> deployedApplicationNames)
Initializes the application router providing a list of the currently deployed applications.


getNextApplication

public SipApplicationRouterInfo getNextApplication(SipServletRequest initialRequest,
                                                   SipApplicationRoutingRegion region,
                                                   SipApplicationRoutingDirective directive,
                                                   SipTargetedRequestInfo targetedRequestInfo,
                                                   java.io.Serializable stateInfo)
This method is called by the container (adaptation layer) when a servlet sends or proxies an initial SipServletRequest. Based on the router configuration previously obtained and the directive from the application (one of NEW or CONTINUE), this implementation determines the next application to be invoked and returns its name along with other information back to the container. If the region parameter is not set, this implementation starts in the ORIGINATING region. When all applications have been invoked in the ORIGINATING region, this implementation advances to the TERMINATING region to invoke applications there.

The application router returns a set of information encapsulated in the SipApplicationRouterInfo class.

Specified by:
getNextApplication in interface SipApplicationRouter
Parameters:
initialRequest - The initial request for which the container is asking for application selection
region - Which region the application selection process is in - set by this implementation
directive - The routing directive used in creating this request. One of either NEW or CONTINUE. If this is a request received externally, directive is NEW.
stateInfo - If this request is relayed from a previous request by an application, this is the stored state the application router returned earlier when invoked to handle the previous request.
Returns:
Application selection result
See Also:
org.echarts.servlet.sip.appRouter.SipApplicationRouterInfo

configurationChanged

public void configurationChanged(java.io.InputStream configInputStream)