Skip navigation links

Oracle Communications Service Broker
SAL API Reference Reference
Release 6.0

E26227-01


com.convergin.common.sal.ext.api
Class SalApplication

java.lang.Object
  extended by com.convergin.common.sal.ext.api.SalApplication


public abstract class SalApplication
extends java.lang.Object

An abstract class to be sub-classed to create a SAL application. This class receives incoming messages through the service method. This method calls doRequest or doResponse for incoming requests and responses, respectively. These two methods in turn dispatch on request method or status code to one of the following methods:

The default implementation of doAck, doCancel and all the response handling methods are empty. All other request handling methods reject the request with a 500 error response. Subclasses of SalApplication will usually override one or more of these methods.


Field Summary
static java.lang.String SAL_FACTORY
          The name of the SalFactory attribute whose value is an instance of the SipFactory interface.

 

Constructor Summary
SalApplication()
           

 

Method Summary
 void destroy()
          Called by the SalApplication container to indicate that this SalApplication is being taken out of service.
protected  void doAck(SalRequest req)
          Invoked by the server (via the service method) to handle incoming ACK requests.
protected  void doBranchResponse(SalResponse resp)
          Invoked by the server to handle intermediate final responses only if this Servlet behaves as a proxy.
protected  void doBye(SalRequest req)
          Invoked by the server (via the service method) to handle incoming BYE requests.
protected  void doCancel(SalRequest req)
          Invoked by the server (via the service method) to handle incoming CANCEL requests.
protected  void doErrorResponse(SalResponse resp)
          Invoked by the server (via the doResponse method) to handle incoming 4xx - 6xx class responses.
protected  void doInfo(SalRequest req)
          Invoked by the server (via the service method) to handle incoming INFO requests.
protected  void doInvite(SalRequest req)
          Invoked by the server (via the service method) to handle incoming INVITE requests.
protected  void doMessage(SalRequest req)
          Invoked by the server (via the service method) to handle incoming MESSAGE requests.
protected  void doNotify(SalRequest req)
          Invoked by the server (via the service method) to handle incoming NOTIFY requests.
protected  void doOptions(SalRequest req)
          Invoked by the server (via the service method) to handle incoming OPTIONS requests.
protected  void doPrack(SalRequest req)
          Invoked by the server (via the service method) to handle incoming PRACK requests.
protected  void doProvisionalResponse(SalResponse resp)
          Invoked by the server (via the doResponse method) to handle incoming 1xx class responses.
protected  void doPublish(SalRequest req)
          Invoked by the server (via the service method) to handle incoming PUBLISH requests.
protected  void doRedirectResponse(SalResponse resp)
          Invoked by the server to notify the servlet of incoming 3xx class responses.
protected  void doRefer(SalRequest req)
          Invoked by the server (via the service method) to handle incoming REFER requests.
protected  void doRegister(SalRequest req)
          Invoked by the server (via the service method) to handle incoming REGISTER requests.
protected  void doRequest(SalRequest req)
          Invoked to handle incoming requests.
protected  void doResponse(SalResponse resp)
          Invoked to handle incoming responses.
protected  void doSubscribe(SalRequest req)
          Invoked by the server (via the service method) to handle incoming SUBSCRIBE requests.
protected  void doSuccessResponse(SalResponse resp)
          Invoked by the server (via the doResponse method) to handle incoming 2xx class responses.
protected  void doUpdate(SalRequest req)
          Invoked by the server (via the service method) to handle incoming UPDATE requests.
 SalConfig getSalConfig()
          Returns this sal application SalConfig object.
 void init(SalConfig config)
          Called by the SalApplication container to indicate that this SalApplication is being placed into service.
 void service(SalRequest req, SalResponse resp)
          Invoked to handle incoming SAL messages: requests or responses.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

SAL_FACTORY

public static final java.lang.String SAL_FACTORY
The name of the SalFactory attribute whose value is an instance of the SipFactory interface.
See Also:
Constant Field Values

Constructor Detail

SalApplication

public SalApplication()

Method Detail

getSalConfig

public SalConfig getSalConfig()
Returns this sal application SalConfig object.
Returns:
the SalConfig object that initialized this sal application.

init

public void init(SalConfig config)
          throws SalApplicationException
Called by the SalApplication container to indicate that this SalApplication is being placed into service.

This implementation stores the SalConfig object it receives from the container for later use. When overriding this form of the method, call super.init(config).

Parameters:
config - the SalConfig object that contains configuration information for this instance.
Throws:
SalApplicationException

destroy

public void destroy()
Called by the SalApplication container to indicate that this SalApplication is being taken out of service.

service

public void service(SalRequest req,
                    SalResponse resp)
             throws SalApplicationException,
                    java.io.IOException
Invoked to handle incoming SAL messages: requests or responses. Exactly one of the arguments is null: if the event is a request the response argument is null, and vice versa, if the event is a response the request argument is null.

This method dispatched to doRequest() or doResponse() as appropriate. SalApplications will not usually need to override this method.

Parameters:
req - the request to handle, or null if the triggering event was an incoming response
resp - incoming response or null if the triggering event was an incoming request
Throws:
SalApplicationException
java.io.IOException

doRequest

protected void doRequest(SalRequest req)
                  throws SalApplicationException,
                         java.io.IOException
Invoked to handle incoming requests. This method dispatch requests to one of the doXxx methods where Xxx is the SAL method used in the request.
SalApplications will not usually need to override this method.
Parameters:
req - represents the incoming SIP request
Throws:
SalApplicationException
java.io.IOException

doInvite

protected void doInvite(SalRequest req)
                 throws SalApplicationException,
                        java.io.IOException
Invoked by the server (via the service method) to handle incoming INVITE requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL INVITE request
Throws:
SalApplicationException
java.io.IOException

doAck

protected void doAck(SalRequest req)
              throws SalApplicationException,
                     java.io.IOException
Invoked by the server (via the service method) to handle incoming ACK requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL ACK request
Throws:
SalApplicationException
java.io.IOException

doPublish

protected void doPublish(SalRequest req)
                  throws SalApplicationException,
                         java.io.IOException
Invoked by the server (via the service method) to handle incoming PUBLISH requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL PUBLISH request
Throws:
SalApplicationException
java.io.IOException

doOptions

protected void doOptions(SalRequest req)
                  throws SalApplicationException,
                         java.io.IOException
Invoked by the server (via the service method) to handle incoming OPTIONS requests. The default implementation is empty and must be overridden by subclasses to do something useful.
Parameters:
req - represents the incoming SAL OPTIONS request
Throws:
SalApplicationException
java.io.IOException

doBye

protected void doBye(SalRequest req)
              throws SalApplicationException,
                     java.io.IOException
Invoked by the server (via the service method) to handle incoming BYE requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL BYE request
Throws:
SalApplicationException
java.io.IOException

doCancel

protected void doCancel(SalRequest req)
                 throws SalApplicationException,
                        java.io.IOException
Invoked by the server (via the service method) to handle incoming CANCEL requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL CANCEL request
Throws:
SalApplicationException
java.io.IOException

doRegister

protected void doRegister(SalRequest req)
                   throws SalApplicationException,
                          java.io.IOException
Invoked by the server (via the service method) to handle incoming REGISTER requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL REGISTER request
Throws:
SalApplicationException
java.io.IOException

doSubscribe

protected void doSubscribe(SalRequest req)
                    throws SalApplicationException,
                           java.io.IOException
Invoked by the server (via the service method) to handle incoming SUBSCRIBE requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL SUBSCRIBE request
Throws:
SalApplicationException
java.io.IOException

doNotify

protected void doNotify(SalRequest req)
                 throws SalApplicationException,
                        java.io.IOException
Invoked by the server (via the service method) to handle incoming NOTIFY requests. The default implementation is empty and must be overridden by subclasses to do something useful.
Parameters:
req - represents the incoming SAL NOTIFY request
Throws:
SalApplicationException
java.io.IOException

doMessage

protected void doMessage(SalRequest req)
                  throws SalApplicationException,
                         java.io.IOException
Invoked by the server (via the service method) to handle incoming MESSAGE requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL MESSAGE request
Throws:
SalApplicationException
java.io.IOException

doInfo

protected void doInfo(SalRequest req)
               throws SalApplicationException,
                      java.io.IOException
Invoked by the server (via the service method) to handle incoming INFO requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL INFO request
Throws:
SalApplicationException
java.io.IOException

doPrack

protected void doPrack(SalRequest req)
                throws SalApplicationException,
                       java.io.IOException
Invoked by the server (via the service method) to handle incoming PRACK requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL PRACK request
Throws:
SalApplicationException
java.io.IOException

doUpdate

protected void doUpdate(SalRequest req)
                 throws SalApplicationException,
                        java.io.IOException
Invoked by the server (via the service method) to handle incoming UPDATE requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL UPDATE request
Throws:
SalApplicationException
java.io.IOException

doRefer

protected void doRefer(SalRequest req)
                throws SalApplicationException,
                       java.io.IOException
Invoked by the server (via the service method) to handle incoming REFER requests.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
req - represents the incoming SAL REFER request
Throws:
SalApplicationException
java.io.IOException

doResponse

protected void doResponse(SalResponse resp)
                   throws SalApplicationException,
                          java.io.IOException
Invoked to handle incoming responses. This method dispatches responses to one of the doProvisionalResponse(com.convergin.common.sal.ext.api.SalResponse), doSuccessResponse(com.convergin.common.sal.ext.api.SalResponse), doBranchResponse(com.convergin.common.sal.ext.api.SalResponse), doRedirectResponse(com.convergin.common.sal.ext.api.SalResponse) or doErrorResponse(com.convergin.common.sal.ext.api.SalResponse).
Parameters:
resp - the response object
Throws:
SalApplicationException
java.io.IOException

doProvisionalResponse

protected void doProvisionalResponse(SalResponse resp)
                              throws SalApplicationException,
                                     java.io.IOException
Invoked by the server (via the doResponse method) to handle incoming 1xx class responses.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
resp - the response object
Throws:
SalApplicationException
java.io.IOException

doSuccessResponse

protected void doSuccessResponse(SalResponse resp)
                          throws SalApplicationException,
                                 java.io.IOException
Invoked by the server (via the doResponse method) to handle incoming 2xx class responses.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
resp - the response object
Throws:
SalApplicationException
java.io.IOException

doRedirectResponse

protected void doRedirectResponse(SalResponse resp)
                           throws SalApplicationException,
                                  java.io.IOException
Invoked by the server to notify the servlet of incoming 3xx class responses.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
resp - the response object
Throws:
SalApplicationException
java.io.IOException

doErrorResponse

protected void doErrorResponse(SalResponse resp)
                        throws SalApplicationException,
                               java.io.IOException
Invoked by the server (via the doResponse method) to handle incoming 4xx - 6xx class responses.

The default implementation is empty and must be overridden by subclasses to do something useful.

Parameters:
resp - the response object
Throws:
SalApplicationException
java.io.IOException

doBranchResponse

protected void doBranchResponse(SalResponse resp)
                         throws SalApplicationException,
                                java.io.IOException
Invoked by the server to handle intermediate final responses only if this Servlet behaves as a proxy.

The default implementation is empty and must be overridden by subclasses to handle intermediate final responses received on a ProxyBranch.

Parameters:
resp - the response object
Throws:
SalApplicationException
java.io.IOException

Skip navigation links

Oracle Communications Service Broker
SAL API Reference Reference
Release 6.0

E26227-01


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.