javax.servlet.sip
Interface ConvergedHttpSession

All Superinterfaces:
javax.servlet.http.HttpSession

public interface ConvergedHttpSession
extends javax.servlet.http.HttpSession

The ConvergedHttpSession class provides access to HttpSession related functionality which is only present in a converged HTTP/SIP container. In a converged container, an instance of HttpSession can be cast to ConvergedHttpSession in order to access methods available available only to converged applications.

Since:
1.1

Method Summary
 java.lang.String encodeURL(java.lang.String url)
          This method encodes the HTTP URL with the jsessionid.
 java.lang.String encodeURL(java.lang.String relativePath, java.lang.String scheme)
          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.
 SipApplicationSession getApplicationSession()
          Returns the parent SipApplicationSession if it exists, if none exists then a new one is created and returned after associating it with the converged http session.
 
Methods inherited from interface javax.servlet.http.HttpSession
getAttribute, getAttributeNames, getCreationTime, getId, getLastAccessedTime, getMaxInactiveInterval, getServletContext, getSessionContext, getValue, getValueNames, invalidate, isNew, putValue, removeAttribute, removeValue, setAttribute, setMaxInactiveInterval
 

Method Detail

getApplicationSession

SipApplicationSession getApplicationSession()
Returns the parent SipApplicationSession if it exists, if none exists then a new one is created and returned after associating it with the converged http session.

Returns:
the parent SipApplicationSession

encodeURL

java.lang.String encodeURL(java.lang.String url)
This method encodes the HTTP URL with the jsessionid. ";jsessionid=http-session-id". The URL parameter should be an absolute URL. For example, http://server:7001/mywebapp/foo.jsp. Where "/mywebapp" is the context path of the the current ServletContext, because that is where the httpSession belongs to.

Parameters:
url - the HTTP URL String to be encoded
Returns:
encoded URL with jsessionid

encodeURL

java.lang.String encodeURL(java.lang.String relativePath,
                           java.lang.String scheme)
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.

For example, this method converts:

   from: "/foo.jsp"
   to: "http://server:8888/mywebapp/foo.jsp;jsessionid=http-session-id"
 
Where, "/mywebapp" is the contextPath for the current ServletContext server is the front end host defined for the web server.

Parameters:
relativePath - relative to the current webapp
scheme - the scheme ("http" or "https")
Returns:
encoded URL with jsessionid