Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


com.bea.wcp.sip
Interface WlssSipSessionsUtil


public interface WlssSipSessionsUtil

(c) BEA Systems 2006


Method Summary
 java.lang.Object doAction(java.lang.String applicationSessionId, WlssAction action)
          This method allows a way to execute a WlssAction in a synchronous manner.
 void doAsynchronousAction(java.lang.String applicationSessionId, WlssAsynchronousAction action)
          This method allows an application to access a SipApplicationSession in an asynchronous manner.
 SipApplicationSession getApplicationSession(java.lang.String applicationSessionId, long timeout, java.util.concurrent.TimeUnit unit)
          This method performs getSipApplicationSession but with the added timeout

 

Method Detail

getApplicationSession

SipApplicationSession getApplicationSession(java.lang.String applicationSessionId,
                                            long timeout,
                                            java.util.concurrent.TimeUnit unit)
                                            throws LockTimeoutException
This method performs getSipApplicationSession but with the added timeout
Parameters:
applicationSessionId - sipapplicationsession id
timeout - timeout
unit - TimeUnit
Returns:
SipApplicationSession
Throws:
LockTimeoutException - - if the SipApplicationSession can't be retrived in <timeout>

doAction

java.lang.Object doAction(java.lang.String applicationSessionId,
                          WlssAction action)
                          throws java.lang.Exception
This method allows a way to execute a WlssAction in a synchronous 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 with applicationSessionId. 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 corresponding to the applicationSessionId.
Parameters:
applicationSessionId - id of the SipApplicationSession that needs to be updated in a transactional manner.
action - WlssAction which is passed by the application
Returns:
Returns the result of the WlssAction's run method (may be null)
Throws:
java.lang.IllegalArgumentException - if applicationSessionId or action parameters were null or if callId could not be extracted from the applicationSessionId
java.lang.Exception
See Also:
WlssSipApplicationSession.doAction(com.bea.wcp.sip.WlssAction)

doAsynchronousAction

void doAsynchronousAction(java.lang.String applicationSessionId,
                          WlssAsynchronousAction action)
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. It is upto container to decide whether the work executes locally or remotely. <p/>

Example Usage:

 <p/>
    SipApplicationSession appSession = ...;
    appSession.doAsynchronousAction(new SipApplicationSessionAsynchronousWork() {
       Serializable run(SipApplicationSession appSession) {
         // add your business logic here
         int counter = appSession.getAttribute("counter");
         ++ counter;
         appSession.setAttribute("counter", counter);
         return null;
       }
     });
 
Parameters:
action - 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, WlssSipApplicationSession.doAsynchronousAction(com.bea.wcp.sip.WlssAsynchronousAction)

Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


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