oracle.jbo.http
Class HttpContainer
java.lang.Object
|
+--oracle.jbo.http.HttpContainer
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.http.HttpSessionBindingListener, java.io.Serializable, SessionCookieListener
- public class HttpContainer
- extends java.lang.Object
- implements javax.servlet.http.HttpSessionBindingListener, SessionCookieListener, java.io.Serializable
A container for BC4J HTTP context resources. This class is intended for
use by BC4J classes that must cache application resources in one of the
servlet/jsp contexts. This may include the HttpSession, the
HttpServletRequest, the HttpServletResponse, and the PageContext.
The container provides a listener interface to notify cached BC4J resources
when they are bound and unbound from the context container.
- See Also:
- Serialized Form
Type | Method |
void |
clear(java.util.Properties userProperties)
|
void |
cookieUpdated()
|
java.lang.String |
encodeURL(java.lang.String url)
Encode a URL with the values of the session cookies that are contained
by this container. |
static SessionCookie |
findSessionCookie(javax.servlet.http.HttpSession session,
java.lang.String applicationId,
java.lang.String applicationDefinitionName,
java.util.Properties cookieProperties)
|
static SessionCookie |
findSessionCookie(javax.servlet.http.HttpSession session,
java.lang.String applicationId,
java.lang.String poolName,
java.lang.String configPackage,
java.lang.String configSection,
java.util.Properties poolProps,
java.util.Properties cookieProps)
|
static HttpContainer |
getInstanceFromSession(javax.servlet.http.HttpSession session)
Retrieve an http container instance from the http session context. |
SessionCookie |
getSessionCookie(java.lang.String applicationId)
Get a session cookie instance from the http session container. |
SessionCookie[] |
getSessionCookies()
Get all session cookie instances from the http session container. |
java.lang.Object |
getValue(java.lang.Object key)
|
java.lang.Object |
putValue(java.lang.Object key,
java.lang.Object value,
java.util.Properties userProperties)
|
java.lang.Object |
removeValue(java.lang.Object key,
java.util.Properties userProperties)
|
java.lang.Object |
removeValueInternal(java.lang.Object key)
|
void |
setSessionCookie(java.lang.String applicationId,
SessionCookie cookie)
Set a session cookie instance in the http session container. |
void |
timeout(java.util.Properties userProperties)
|
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent e)
|
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PAGE_CONTEXT_CONTAINER_NAME
public static final java.lang.String PAGE_CONTEXT_CONTAINER_NAME
SESSION_CONTEXT_CONTAINER_NAME
public static final java.lang.String SESSION_CONTEXT_CONTAINER_NAME
APPLICATION_COOKIE_PREFIX
public static final java.lang.String APPLICATION_COOKIE_PREFIX
APPLICATION_BINDING_LISTENER_PREFIX
public static final java.lang.String APPLICATION_BINDING_LISTENER_PREFIX
APPLICATION_PREFIX
public static final java.lang.String APPLICATION_PREFIX
HttpContainer
public HttpContainer(java.lang.Object contextRef)
- Deprecated.
- Constructor
- Since:
- 5.0
HttpContainer
public HttpContainer()
getValue
public java.lang.Object getValue(java.lang.Object key)
removeValue
public java.lang.Object removeValue(java.lang.Object key,
java.util.Properties userProperties)
removeValueInternal
public java.lang.Object removeValueInternal(java.lang.Object key)
clear
public void clear(java.util.Properties userProperties)
timeout
public void timeout(java.util.Properties userProperties)
putValue
public java.lang.Object putValue(java.lang.Object key,
java.lang.Object value,
java.util.Properties userProperties)
valueBound
public void valueBound(javax.servlet.http.HttpSessionBindingEvent e)
- Specified by:
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
valueUnbound
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent e)
- Specified by:
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
getInstanceFromSession
public static HttpContainer getInstanceFromSession(javax.servlet.http.HttpSession session)
- Retrieve an http container instance from the http session context.
- Parameters:
session
- the target http session context
getSessionCookie
public SessionCookie getSessionCookie(java.lang.String applicationId)
- Get a session cookie instance from the http session container.
- Parameters:
applicationId
- the application id that will be used to reference the
session cookie
getSessionCookies
public SessionCookie[] getSessionCookies()
- Get all session cookie instances from the http session container.
setSessionCookie
public void setSessionCookie(java.lang.String applicationId,
SessionCookie cookie)
- Set a session cookie instance in the http session container. The
cookie name will be used to store the session cookie.
- Parameters:
applicationId
- the application id that will be used to reference the
session cookiecookie
- the session cookie instance that will be stored
encodeURL
public java.lang.String encodeURL(java.lang.String url)
- Encode a URL with the values of the session cookies that are contained
by this container. The encoded values will be decoded by the
default implementation of
SessionCookie.readValue(Object)
when and if the session cookie is re-instantiated.
cookieUpdated
public void cookieUpdated()
- Specified by:
cookieUpdated
in interface SessionCookieListener
findSessionCookie
public static SessionCookie findSessionCookie(javax.servlet.http.HttpSession session,
java.lang.String applicationId,
java.lang.String applicationDefinitionName,
java.util.Properties cookieProperties)
findSessionCookie
public static SessionCookie findSessionCookie(javax.servlet.http.HttpSession session,
java.lang.String applicationId,
java.lang.String poolName,
java.lang.String configPackage,
java.lang.String configSection,
java.util.Properties poolProps,
java.util.Properties cookieProps)