Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.jbo.http
Class HttpSessionCookieHelperImpl

java.lang.Object
  extended byoracle.jbo.http.HttpSessionCookieHelperImpl
All Implemented Interfaces:
HttpSessionCookieHelper

public class HttpSessionCookieHelperImpl
extends java.lang.Object
implements HttpSessionCookieHelper

Default HttpSessionCookieHelper implementation.


Constructor Summary
HttpSessionCookieHelperImpl()
          Constructor
 
Method Summary
 java.lang.String encodeURL(java.lang.String url, SessionCookie[] cookies)
          Encode the specified url with the specified HttpSessionCookies.
 java.lang.String generateSessionId(javax.servlet.http.HttpServletRequest request)
          Return a unique identifier for this session.
 java.lang.String generateSessionId(javax.servlet.http.HttpSession session)
           
 java.lang.String readCookieValue(javax.servlet.http.Cookie[] cookies, java.lang.String applicationName)
           
 java.lang.String readCookieValue(javax.servlet.http.HttpServletRequest request, java.lang.String applicationName)
          Read the session id from the HttpServletRequest.
 void writeCookieValue(javax.servlet.http.HttpServletResponse response, SessionCookie sessionCookie)
          Write the session id to the HttpServletResponse.
 void writeCookieValue(javax.servlet.http.HttpServletResponse response, java.lang.String applicationName, java.lang.String cookieValue)
          Write the session id to the HttpServletResponse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpSessionCookieHelperImpl

public HttpSessionCookieHelperImpl()
Constructor

Method Detail

readCookieValue

public java.lang.String readCookieValue(javax.servlet.http.HttpServletRequest request,
                                        java.lang.String applicationName)
Description copied from interface: HttpSessionCookieHelper
Read the session id from the HttpServletRequest. By default this method uses Http cookies to store the unique session identifier for a stateful application module.

Specified by:
readCookieValue in interface HttpSessionCookieHelper
Parameters:
applicationName - the name of the application that has session state

readCookieValue

public java.lang.String readCookieValue(javax.servlet.http.Cookie[] cookies,
                                        java.lang.String applicationName)
Specified by:
readCookieValue in interface HttpSessionCookieHelper

writeCookieValue

public void writeCookieValue(javax.servlet.http.HttpServletResponse response,
                             java.lang.String applicationName,
                             java.lang.String cookieValue)
Description copied from interface: HttpSessionCookieHelper
Write the session id to the HttpServletResponse. By default this method uses Http cookies to store a unique session identifier for a stateful application module.

Specified by:
writeCookieValue in interface HttpSessionCookieHelper
Parameters:
applicationName - the name of the application that has session state

writeCookieValue

public void writeCookieValue(javax.servlet.http.HttpServletResponse response,
                             SessionCookie sessionCookie)
Description copied from interface: HttpSessionCookieHelper
Write the session id to the HttpServletResponse. By default this method uses Http cookies to store a unique session identifier for a stateful application module.

Specified by:
writeCookieValue in interface HttpSessionCookieHelper
Parameters:
sessionCookie - the BC4J SessionCookie that is to be written.

generateSessionId

public java.lang.String generateSessionId(javax.servlet.http.HttpSession session)
Specified by:
generateSessionId in interface HttpSessionCookieHelper

generateSessionId

public java.lang.String generateSessionId(javax.servlet.http.HttpServletRequest request)
Description copied from interface: HttpSessionCookieHelper
Return a unique identifier for this session. The session identifer will be used by the application pool to identify client sessions and to activate application state from previous requests.

The session identifier should be unique across virtual machines for each application client. Conflicting session identifiers may result in one application client reading and changing the application state of another application client.

The session identifer should also be consistent across requests for each client. If a given application client requests all generate different session identifiers the application pool will not be able to track the application state for that application client between those requests and will treat each individual request as having originated from a different application client.

The default implementation is using the client IP address to generate session identifiers. Application developers may override this implementation to use a different technique to generate session identifiers.

Specified by:
generateSessionId in interface HttpSessionCookieHelper

encodeURL

public java.lang.String encodeURL(java.lang.String url,
                                  SessionCookie[] cookies)
Description copied from interface: HttpSessionCookieHelper
Encode the specified url with the specified HttpSessionCookies. The session cookies will be read from the URL if a browser cookie is not when the application HttpSessionCookie is re-instantiated.

This method should be invoked from HttpContainer.encodeURL(String)

Specified by:
encodeURL in interface HttpSessionCookieHelper

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

Copyright © 1997, 2004, Oracle. All rights reserved.