|
Oracle Corp. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.wcp.util.Sessions
A utility class for supporting converged applications having HTTP and SIP Sessions. An instance of this class is available as the ServletContext attribute "com.bea.wcp.util.Sessions" for converged applications. Several methods in this class need to lock underlying sessions (call states, strictly speaking), and that locking could possibly fail. This does not necessarily indicate an error condition, merely that the object is busy, and accessed by another thread. When a lock can not be obtained, but nothing is actually wrong, a runtime exception of type UnableToLockException is thrown.
Field Summary |
Fields inherited from interface com.bea.wcp.sip.SipConstants |
APPSESSION_TIMEOUT_DURATION, APPSESSION_TIMEOUT_MAX, BRANCH_PREFIX, CATTR_100REL, CATTR_ATTR_DIAMETER_NODE, CATTR_FACTORY, CATTR_OUTBOUND_INTERFACES, CATTR_PATH, CATTR_PROFILE_SERVICE, CATTR_SUPPORTED, CATTR_SUPPORTEDRFCS, CATTR_TIMER, CATTR_TMPDIR, CATTR_TRACE_MESSAGE_LISTENER_FACTORY, CHARSET_UTF8, DEFAULT_ENCODING, DEFAULT_EXPIRES, DEFAULT_MAX_FORWARDS, DEFAULT_MAX_UDP_SIZE, DEFAULT_MTU_SIZE, DEFAULT_RETRY_AFTER, DEFAULT_T1, DEFAULT_T2, DEFAULT_T4, DEFAULT_TB, DEFAULT_TCP_PORT, DEFAULT_TF, DEFAULT_TLS_PORT, DEFAULT_UDP_PORT, DELIMITER, HEADER_CLUSTER_INFO, HEADER_PARAMETER_CLUSTER, HEADER_PROXY_POLICY, HEADER_SIDEWAYS_INFO_ORIG_CONN, HEADER_SIDEWAYS_INFO_RELAY_CONN, HEADER_SIDEWAYS_INFO_REQ_CERT, HEADER_SIDEWAYS_INFO_RESP_CERT, MAX_UDP_PAYLOAD_SIZE, MAX_UNSIGNED_BYTE, MAX_UNSIGNED_INT, MIN_UNSIGNED_BYTE, MIN_UNSIGNED_INT, MINUTE, MTU_HEADER_SIZE, NAP_PROTOCOL_DIAMETER, NAP_PROTOCOL_DIAMETER_SCTP, NAP_PROTOCOL_DIAMETERS, NAP_PROTOCOL_SIP, NAP_PROTOCOL_SIP_ADMIN, NAP_PROTOCOL_SIPS, REQ_X509Certificate, RESP_X509Certificate, SCTP, SESSIONS, SIP_JNDI_OBJECTS, SIP_JNDI_SIP_FACTORY, SIP_JNDI_SIP_SESSIONS_UTIL, SIP_JNDI_TIMER_SERVICE, SIP_SESSIONS_UTIL, SIP_VERSION, SUPPORTED_EXTN, TCP, TLS, UDP, UDP_PACKET_SIZE |
Constructor Summary | |
Sessions(ServletContext servletContext)
|
Method Summary | |
HttpSession |
createHttpSession()
Deprecated. javax.servlet.sip.ConvergedHttpSession.getApplicationSession should be used instead. |
java.lang.Object |
doAction(java.lang.String applicationSessionId,
WlssAction action)
This method allows a way to execute a WlssAction in a transactional manner. |
SipApplicationSession |
getApplicationSession(HttpSession httpSession)
Deprecated. javax.servlet.sip.ConvergedHttpSession.getApplicationSession() should be used instead |
SipApplicationSession |
getApplicationSession(java.lang.String applicationSessionId)
Deprecated. javax.servlet.sip.SipSessionsUtil.getApplicationSession( String applicationSessionId) should be used instead. |
SipApplicationSession |
getApplicationSession(java.lang.String applicationSessionId,
long timeout,
java.util.concurrent.TimeUnit units)
Deprecated. javax.servlet.sip.SipSessionsUtil.getApplicationSession( String applicationSessionId) should be used instead. |
java.util.Iterator |
getApplicationSessionsByCallId(java.lang.String callId)
Deprecated. javax.servlet.sip.ConvergedHttpSession should be used instead. |
java.util.Iterator |
getApplicationSessionsByCallId(java.lang.String callId,
long timeout,
java.util.concurrent.TimeUnit units)
Deprecated. javax.servlet.sip.ConvergedHttpSession should be used instead. |
java.lang.String |
getEncodedURL(java.lang.String url,
HttpSession httpSession)
Deprecated. javax.servlet.sip.ConvergedHttpSession.encodeURL(String url) should be used instead |
java.lang.String |
getEncodedURL(java.lang.String relativePath,
java.lang.String scheme,
HttpSession httpSession)
Deprecated. javax.servlet.sip.ConvergedHttpSession.encodeURL(String relativePath, String scheme) should be used instead |
void |
removeApplicationSession(HttpSession httpSession)
Deprecated. javax.servlet.sip.ConvergedHttpSession should be used instead. |
void |
removeApplicationSession(HttpSession httpSession,
long timeout,
java.util.concurrent.TimeUnit units)
Deprecated. javax.servlet.sip.ConvergedHttpSession should be used instead. |
void |
setApplicationSession(HttpSession httpSession,
SipApplicationSession sipApplicationSession)
Deprecated. javax.servlet.sip.ConvergedHttpSession.getApplicationSession() should be used instead. |
void |
setApplicationSession(HttpSession httpSession,
SipApplicationSession sipApplicationSession,
long timeout,
java.util.concurrent.TimeUnit units)
Deprecated. javax.servlet.sip.ConvergedHttpSession.getApplicationSession() should be used instead. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Sessions(ServletContext servletContext)
Method Detail |
public HttpSession createHttpSession()
setApplicationSession(javax.servlet.http.HttpSession,
javax.servlet.sip.SipApplicationSession)
,
removeApplicationSession(javax.servlet.http.HttpSession)
public java.lang.Object doAction(java.lang.String applicationSessionId, WlssAction action) throws java.lang.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 application
java.lang.IllegalArgumentException
- if applicationSessionId or action parameters were null
or if callId could not be extracted from the applicationSessionId
java.lang.Exception
WlssSipApplicationSession.doAction(com.bea.wcp.sip.WlssAction)
public SipApplicationSession getApplicationSession(HttpSession httpSession)
httpSession
- child httpSession of requested ApplicationSession
setApplicationSession(javax.servlet.http.HttpSession,
javax.servlet.sip.SipApplicationSession)
,
removeApplicationSession(javax.servlet.http.HttpSession)
public SipApplicationSession getApplicationSession(java.lang.String applicationSessionId)
applicationSessionId
- the SipApplicationSession's id
com.bea.wcp.sip.engine.server.UnableToLockException
SipApplicationSession.getId()
public SipApplicationSession getApplicationSession(java.lang.String applicationSessionId, long timeout, java.util.concurrent.TimeUnit units) throws com.bea.wcp.sip.engine.server.LockTimeoutException
applicationSessionId
- the SipApplicationSession's idtimeout
- how long to try to get the required lockunits
- the unit for timeout -- milliseconds, presumably
com.bea.wcp.sip.engine.server.LockTimeoutException
- if cannot aquire lock in TimeUnit
SipApplicationSession.getId()
public java.util.Iterator getApplicationSessionsByCallId(java.lang.String callId)
callId
- the Call-ID String
com.bea.wcp.sip.engine.server.UnableToLockException
SipServletMessage.getCallId()
public java.util.Iterator getApplicationSessionsByCallId(java.lang.String callId, long timeout, java.util.concurrent.TimeUnit units) throws com.bea.wcp.sip.engine.server.LockTimeoutException
This method provides explicit control over locking, using the timeout and unit parameters, and the thrown LockTimeoutException exception.
callId
- the Call-ID Stringtimeout
- how long to try to get the required lockunits
- the unit for timeout -- milliseconds, presumably
com.bea.wcp.sip.engine.server.LockTimeoutException
- if cannot aquire lock in TimeUnit
SipServletMessage.getCallId()
public java.lang.String getEncodedURL(java.lang.String url, HttpSession httpSession)
url
- the HTTP url String to be encodedhttpSession
- the session created using createHttpSession()
createHttpSession()
public java.lang.String getEncodedURL(java.lang.String relativePath, java.lang.String scheme, HttpSession httpSession)
For example, this method converts:
from:Where,"/foo.jsp"
to:"http://server:8888/mywebapp/foo.jsp;jsessionid=http-session-id|primary|secondary"
"/mywebapp" is the contextPath for the current ServletContext server is the FrontendHost defined in ClusterMBean/ServerMBean. If missing, it defaults to the ListenAddress of the current server. port is the FrontendHTTPPort/FrontendHTTPSPort (depending on the scheme) as defined in the ClusterMBean/ServerMBean. If missing, it defaults to the publicAddress of the SSL NetworkChannel
relativePath
- relative to the current webappscheme
- the scheme ("http" or "https")httpSession
- the session created using createHttpSession()
createHttpSession()
public void removeApplicationSession(HttpSession httpSession)
httpSession
- HttpSession
com.bea.wcp.sip.engine.server.UnableToLockException
setApplicationSession(javax.servlet.http.HttpSession,
javax.servlet.sip.SipApplicationSession)
public void removeApplicationSession(HttpSession httpSession, long timeout, java.util.concurrent.TimeUnit units) throws com.bea.wcp.sip.engine.server.LockTimeoutException
httpSession
- HttpSessiontimeout
- how long to try to get the required lockunits
- the unit for timeout
com.bea.wcp.sip.engine.server.LockTimeoutException
- if cannot aquire lock in TimeUnit
setApplicationSession(javax.servlet.http.HttpSession,
javax.servlet.sip.SipApplicationSession)
public void setApplicationSession(HttpSession httpSession, SipApplicationSession sipApplicationSession)
httpSession
- HttpSessionsipApplicationSession
- SipApplicationSession
java.lang.IllegalArgumentException
- if parent has been set already
com.bea.wcp.sip.engine.server.UnableToLockException
SipServletMessage.getCallId()
,
removeApplicationSession(javax.servlet.http.HttpSession)
public void setApplicationSession(HttpSession httpSession, SipApplicationSession sipApplicationSession, long timeout, java.util.concurrent.TimeUnit units) throws com.bea.wcp.sip.engine.server.LockTimeoutException
This method provides explicit control over locking, using the timeout and unit parameters, and the thrown LockTimeoutException exception.
httpSession
- HttpSessionsipApplicationSession
- SipApplicationSessiontimeout
- how long to try to get the required lockunits
- the unit for timeout
java.lang.IllegalArgumentException
- if parent has been set already
com.bea.wcp.sip.engine.server.LockTimeoutException
- if cannot aquire lock in TimeUnit
SipServletMessage.getCallId()
,
removeApplicationSession(javax.servlet.http.HttpSession)
|
Documentation is available at http://e-docs.bea.com/wlcp/wlss40/ Copyright 2008 Oracle Corp. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |