public interface WlssSipSessionsUtil
extends javax.servlet.sip.SipSessionsUtil
| Modifier and Type | Method and Description |
|---|---|
Object |
doAction(String applicationSessionId,
WlssAction action)
This method allows a way to execute an WlssAction in a synchronous manner.
|
void |
doAsynchronousAction(String applicationSessionId,
WlssAsynchronousAction action)
This method allows an application to access a SipApplicationSession in an
asynchronous manner.
|
javax.servlet.sip.SipApplicationSession |
getApplicationSession(String applicationSessionId,
long timeout,
TimeUnit unit)
This method performs getSipApplicationSession but with the added timeout
|
boolean |
hasLock(String applicationSessionId) |
javax.servlet.sip.SipApplicationSession getApplicationSession(String applicationSessionId, long timeout, TimeUnit unit) throws LockTimeoutException
applicationSessionId - sipapplicationsession idtimeout - timeoutunit - TimeUnitLockTimeoutException - -
if the SipApplicationSession can't be retrived in Object doAction(String applicationSessionId, WlssAction action) throws Exception
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.applicationSessionId - id of the SipApplicationSession that needs to
be updated in a transactional manner.action - WlssAction which is passed by the applicationIllegalArgumentException - if applicationSessionId or action parameters were null
or if callId could not be extracted from the applicationSessionIdExceptionWlssSipApplicationSession.doAction(com.bea.wcp.sip.WlssAction)void doAsynchronousAction(String applicationSessionId, WlssAsynchronousAction action)
Example Usage:
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; } });
applicationSessionId - id of the SipApplicationSession that needs to
be updated in a transactional manner.action - the work to be done on this SipApplicationSession.
The run method of this object contains the work (business logic) to be performed.WlssAsynchronousAction,
WlssSipApplicationSession.doAsynchronousAction(com.bea.wcp.sip.WlssAsynchronousAction)boolean hasLock(String applicationSessionId)
applicationSessionId - the SipApplicationSession's idSipApplicationSession.getId()