Skip navigation links


javax.servlet.sip.ar
Interface SipApplicationRouter


public interface SipApplicationRouter

This interface class specifies the API between the container and the application router.

Since:
1.1

Method Summary
 void applicationDeployed(java.util.List<java.lang.String> newlyDeployedApplicationNames)
          Container notifies application router that new applications are deployed.
 void applicationUndeployed(java.util.List<java.lang.String> undeployedApplicationNames)
          Container notifies application router that some applications are undeployed.
 void destroy()
          Container calls this method when it finishes using this application router.
 SipApplicationRouterInfo getNextApplication(SipServletRequest initialRequest, SipApplicationRoutingRegion region, SipApplicationRoutingDirective directive, SipTargetedRequestInfo targetedRequestInfo, java.io.Serializable stateInfo)
          This method is called by the container when a servlet sends or proxies an initial SipServletRequest.
 void init()
          Initializes the SipApplicationRouter.
 void init(java.util.Properties properties)
          Initializes the SipApplicationRouter and passes in initialization properties.

 

Method Detail

init

void init()
Initializes the SipApplicationRouter. This method is called by the SIP container and it can only be invoked once.
Throws:
java.lang.IllegalStateException - if invoked more than once

init

void init(java.util.Properties properties)
Initializes the SipApplicationRouter and passes in initialization properties. This method is called by the SIP container. The way in which the container obtains the properties is implementation-dependent.
This method can only be invoked once.
Parameters:
properties - AR initialization properties
Throws:
java.lang.IllegalStateException - if invoked more than once

destroy

void destroy()
Container calls this method when it finishes using this application router.

applicationDeployed

void applicationDeployed(java.util.List<java.lang.String> newlyDeployedApplicationNames)
Container notifies application router that new applications are deployed.
Parameters:
newlyDeployedApplicationNames - A list of names of the newly added applications

applicationUndeployed

void applicationUndeployed(java.util.List<java.lang.String> undeployedApplicationNames)
Container notifies application router that some applications are undeployed.
Parameters:
undeployedApplicationNames - A list of names of the undeployed applications

getNextApplication

SipApplicationRouterInfo getNextApplication(SipServletRequest initialRequest,
                                            SipApplicationRoutingRegion region,
                                            SipApplicationRoutingDirective directive,
                                            SipTargetedRequestInfo targetedRequestInfo,
                                            java.io.Serializable stateInfo)
This method is called by the container when a servlet sends or proxies an initial SipServletRequest. The application router returns a set of information. See SipApplicationRouterInfo for details.
Parameters:
initialRequest - The initial request for which the container is asking for application selection. The request must not be modified by the AR. It is recommended that the implementations explicitly disallow any mutation action by throwing appropriate RuntimeException like IllegalStateException.
region - Which region the application selection process is in
directive - The routing directive used in creating this request. If this is a request received externally, directive is NEW.
targetedRequestInfo - If initialRequest is a targeted request, this object gives the type of targeted request (ENCODED_URI, JOIN, REPLACES) and the targeted application name. If the initialRequest is not targeted, this parameter is null.
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. If no applications are deployed this method returns null.
Throws:
java.lang.NullPointerException - if the initialRequest is null
java.lang.IllegalStateException - if the application router has not been initialized yet

Skip navigation links

Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Java SIP Servlet API 1.1 Reference

Part Number E17883-01