Package com.bea.wcp.sip
Interface WlssSipSessionsUtil
- All Superinterfaces:
javax.servlet.sip.SipSessionsUtil
public interface WlssSipSessionsUtil
extends javax.servlet.sip.SipSessionsUtil
A utility class providing additional support for
converged HTTP/SIP applications and converged Java EE / SIP applications.
- Author:
- Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
-
Method Summary
Modifier and TypeMethodDescriptiondoAction(String applicationSessionId, WlssAction action) This method allows a way to execute an WlssAction in a synchronous manner.voiddoAsynchronousAction(String applicationSessionId, WlssAsynchronousAction action) This method allows an application to access a SipApplicationSession in an asynchronous manner.javax.servlet.sip.SipApplicationSessiongetApplicationSession(String applicationSessionId, long timeout, TimeUnit unit) This method performs getSipApplicationSession but with the added timeoutbooleanMethods inherited from interface javax.servlet.sip.SipSessionsUtil
getApplicationSessionById, getApplicationSessionByKey, getCorrespondingSipSession, getCurrentApplicationSession, getManagedBean, getSipApplicationSessionIds, getSipApplicationSessionIds
-
Method Details
-
getApplicationSession
javax.servlet.sip.SipApplicationSession getApplicationSession(String applicationSessionId, long timeout, TimeUnit unit) throws LockTimeoutException This method performs getSipApplicationSession but with the added timeout- Parameters:
applicationSessionId- sipapplicationsession idtimeout- timeoutunit- TimeUnit- Returns:
- SipApplicationSession
- Throws:
LockTimeoutException- - if the SipApplicationSession can't be retrived in
-
doAction
This method allows a way to execute an WlssAction in a synchronous manner. During the execution of this method, no other thread or engine cluster member will be allowed access to the call-state pertaining to the SipApplicationSession withapplicationSessionId. 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:
IllegalArgumentException- if applicationSessionId or action parameters were null or if callId could not be extracted from the applicationSessionIdException- See Also:
-
doAsynchronousAction
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 up to the container to decide whether the work executes locally or remotely.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; } });
- Parameters:
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.- See Also:
-
hasLock
- Parameters:
applicationSessionId- the SipApplicationSession's id- Returns:
- boolean
- See Also:
-
SipApplicationSession.getId()
-