|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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.
Constructor Summary | |
Sessions(ServletContext servletContext)
|
Method Summary | |
HttpSession |
createHttpSession()
This method creates a new HttpSession. |
SipApplicationSession |
getApplicationSession(HttpSession httpSession)
Returns the SipApplicationSession if a parent-child relationship exists. |
SipApplicationSession |
getApplicationSession(java.lang.String applicationSessionId)
Returns the SipApplicationSession for a given applicationSessionId. |
java.util.Iterator |
getApplicationSessionsByCallId(java.lang.String callId)
Returns an Iterator over all SipApplicationSessions associated with the given callId. |
java.lang.String |
getEncodedURL(java.lang.String url,
HttpSession httpSession)
This method encodes the HTTP URL with the jsessionid. |
java.lang.String |
getEncodedURL(java.lang.String relativePath,
java.lang.String scheme,
HttpSession httpSession)
Converts the given relative path to an absolute URL by prepending the contextPath for the current ServletContext, the given scheme ("http" or "https"), and the host:port, and then encoding the resulting URL with the jsessionid. |
void |
removeApplicationSession(HttpSession httpSession)
This method removes the specified SipApplicationSession as the parent of the given HttpSession, if it was previously designated as the parent. |
void |
setApplicationSession(HttpSession httpSession,
SipApplicationSession sipApplicationSession)
This method sets SipApplicationSession as the parent of the specified HttpSession. |
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 SipApplicationSession getApplicationSession(HttpSession httpSession)
httpSession
-
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
SipApplicationSession.getId()
public java.util.Iterator getApplicationSessionsByCallId(java.lang.String callId)
callId
- the Call-ID String
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
- HttpSessionsetApplicationSession(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 alreadySipServletMessage.getCallId()
,
removeApplicationSession(javax.servlet.http.HttpSession)
|
Documentation is available at http://download.oracle.com/docs/cd/E13209_01/wlcp/wlss22/ Copyright 2006 BEA Systems Inc. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |