Oracle Fusion Middleware
Oracle WebLogic SIP Server API Reference
11g Release 1 (10.3.4)

Part Number E17873-02

com.bea.wcp.sip
Interface WlssSipApplicationSession

All Superinterfaces:
SipApplicationSession

public interface WlssSipApplicationSession
extends SipApplicationSession

This interface is an extension of the standard SipApplicationSession interface.

See Also:
SipApplicationSession, WlssAction

Nested Class Summary
static class WlssSipApplicationSession.PersistenceType
          Used by setPersist( com.bea.wcp.sip.WlssSipApplicationSession.PersistenceType, boolean).
 
Nested classes/interfaces inherited from interface javax.servlet.sip.SipApplicationSession
SipApplicationSession.Protocol
 
Method Summary
 java.lang.Object doAction(WlssAction action)
          This methods executes WlssTask in a transactional manner.
 void doAsynchronousAction(WlssAsynchronousAction asyncWork)
          This method allows an application to access a SipApplicationSession in an asynchronous manner.
 byte getGeoSiteId()
          The site identifier.
 void setPersist(WlssSipApplicationSession.PersistenceType type, boolean value)
          This method can be used to override the default call-state persistence characteristics.
 
Methods inherited from interface javax.servlet.sip.SipApplicationSession
encodeURI, encodeURL, getApplicationName, getAttribute, getAttributeNames, getCreationTime, getExpirationTime, getId, getInvalidateWhenReady, getLastAccessedTime, getSession, getSessions, getSessions, getSipSession, getTimer, getTimers, invalidate, isReadyToInvalidate, isValid, removeAttribute, setAttribute, setExpires, setInvalidateWhenReady
 

Method Detail

doAction

java.lang.Object doAction(WlssAction action)
                          throws java.lang.Exception
This methods executes WlssTask in a transactional manner. During the execution of this method, no other thread or engine tier cluster member will be allowed access to the call-state pertaining to the SipApplicationSession. It has been introduced to provide a mechanism to control concurrency across the entire engine tier cluster while the application is interacting with the SipApplicationSession. This method is intended to be used by non-SIP scoped servlets (e.g. HTTP servlets in converged applications). When this API is used by the applications, the container guarentees that the business logic contained within the WlssAction will be executed with a lock on the SipApplicationSession instance. If used within the SIP scope (in call) and the Call-ID matches, this method will be a no-op, since the container already guarentees concurrency control during the execution of the service method for SIP servlets. If the SipApplicationSession belongs to a different call-state, than the current SIP request, then container will acquire a lock.

Example usage:



   SipApplicationSession appSession = ...;
   WlssSipApplicationSession wlssAppSession = (WlssSipApplicationSession) appSession;

   wlssAppSession.doAction(new WlssAction() {
       public Object run() throws Exception {

         // add your business logic here
         appSession.setAttribute("counter", latestCounterValue);
         sipSession.setAttribute("currentState", latestAppState);

         // The container will make sure that the run method will be invoked
         // the with appSession locked

         return null;
       }
     });
 

Parameters:
action - WlssAction which is passed by the application
Returns:
Returns the result of the WlssTask's run method (may be null)
Throws:
java.lang.Exception - - propagates the Exception thrown by the run method

doAsynchronousAction

void doAsynchronousAction(WlssAsynchronousAction asyncWork)
This method allows an application to access a SipApplicationSession in an asynchronous manner. This method is useful for accessing the SipApplicationSession from Web or EJB modules in a converged application. When this API is used by the above modules, the container guarantees that the business logic contained within the SipApplicationSessionAsynchronousWork will be executed in a thread-safe manner. // review mihirk - the work will always execute locally in our impl, we should remove the comment below It is upto container to decide whether the work executes locally or remotely.

Example Usage:

 

SipApplicationSession appSession = ...; appSession.doAsynchronousAction(new WlssAsynchronousAction() { void run(SipApplicationSession appSession) { // add your business logic here int counter = appSession.getAttribute("counter"); ++ counter; appSession.setAttribute("counter", counter); } });

Parameters:
asyncWork - the work to be done on this SipApplicationSession. The run method of this object contains the work (business logic) to be performed.
See Also:
WlssAsynchronousAction

setPersist

void setPersist(WlssSipApplicationSession.PersistenceType type,
                boolean value)

This method can be used to override the default call-state persistence characteristics.

Parameters:
type - DATABASE denotes that the state should be saved to database by the datatier to save RAM space. GEO_REDUNDANCY indicates that the state should be replicated to the remote site.
value - whether or not to enable the action.

getGeoSiteId

byte getGeoSiteId()
The site identifier. If the session is in the local store then this will be as

Returns:
the aite identifier for this session

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.

Oracle Fusion Middleware
Oracle WebLogic SIP Server API Reference
11g Release 1 (10.3.4)

Part Number E17873-02