Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.coherence.servlet
Class SessionHelperManager

java.lang.Object
  extended by com.tangosol.coherence.servlet.SessionHelperManager


public class SessionHelperManager
extends java.lang.Object
Author:
James Kirsch Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

This is a helper class for the SessionHelper. All methods are static.


Field Summary
static java.lang.String CTX_ATTR_HELPER
          The name of the application server context's attribute that Coherence stores its session helper object under.
static java.lang.String DEFAULT_FACTORY
          The default class name for the SessionHelper factory implementation.

 

Constructor Summary
SessionHelperManager()
           

 

Method Summary
protected static SessionHelper createSessionHelper(javax.servlet.ServletContext ctx)
           
static SessionHelper ensureSessionHelper(javax.servlet.ServletContext ctx)
          Find the existing (or create new) Coherence SessionHelper that will act as a coordinator to manage the creation and lookup of container objects, fake container objects (the Coherence implementation of the Servlet spec interfaces), and helper classes (such as the SessionHelper itself, the servlet model collection, etc.).
static SessionHelper ensureSessionHelper(javax.servlet.ServletContext ctx, boolean configureSessionHelper)
          Find the existing (or create new) Coherence SessionHelper that will act as a coordinator to manage the creation and lookup of container objects, fake container objects (the Coherence implementation of the Servlet spec interfaces), and helper classes (such as the SessionHelper itself, the servlet model collection, etc.).
static javax.servlet.ServletContext ensureWrappedServletContext(javax.servlet.ServletContext ctx)
          Make sure that there is a ServletContext wrapper for the specified servlet context for this application, creating one if necessary.
static int[] getSupportedVersion(javax.servlet.ServletContext ctx)
          Determine the version of the spec to find the factory for based on the passed application server ServletContext object.
static javax.servlet.ServletContext getWrappedServletContext(javax.servlet.ServletContext ctx)
          Determine the ServletContext wrapper for the specified application server context.

 

Field Detail

DEFAULT_FACTORY

public static final java.lang.String DEFAULT_FACTORY
The default class name for the SessionHelper factory implementation.
See Also:
Constant Field Values

CTX_ATTR_HELPER

public static final java.lang.String CTX_ATTR_HELPER
The name of the application server context's attribute that Coherence stores its session helper object under.
See Also:
Constant Field Values

Constructor Detail

SessionHelperManager

public SessionHelperManager()

Method Detail

createSessionHelper

protected static SessionHelper createSessionHelper(javax.servlet.ServletContext ctx)

ensureSessionHelper

public static SessionHelper ensureSessionHelper(javax.servlet.ServletContext ctx)
Find the existing (or create new) Coherence SessionHelper that will act as a coordinator to manage the creation and lookup of container objects, fake container objects (the Coherence implementation of the Servlet spec interfaces), and helper classes (such as the SessionHelper itself, the servlet model collection, etc.).
Parameters:
ctx - the application server's ServletContext object

ensureSessionHelper

public static SessionHelper ensureSessionHelper(javax.servlet.ServletContext ctx,
                                                boolean configureSessionHelper)
Find the existing (or create new) Coherence SessionHelper that will act as a coordinator to manage the creation and lookup of container objects, fake container objects (the Coherence implementation of the Servlet spec interfaces), and helper classes (such as the SessionHelper itself, the servlet model collection, etc.).
Parameters:
ctx - the application server's ServletContext object
configureSessionHelper - if true, configure the new SessionHelper obj

getSupportedVersion

public static int[] getSupportedVersion(javax.servlet.ServletContext ctx)
Determine the version of the spec to find the factory for based on the passed application server ServletContext object.

Note: Hard-coded to support 2.3 through 2.5.

Parameters:
ctx - the application server's ServletContext object
Returns:
an array containing [0] major and [1] minor version of the servlet spec to find the factory for

getWrappedServletContext

public static javax.servlet.ServletContext getWrappedServletContext(javax.servlet.ServletContext ctx)
Determine the ServletContext wrapper for the specified application server context. This method can also be used to determine if another application has a Coherence ServletContext wrapper.
Parameters:
ctx - a ServletContext
Returns:
a ServletContext that wraps around the specified ServletContext or the passed ServletContext itself if it is a wrapper already or null if there is no wrapper

ensureWrappedServletContext

public static javax.servlet.ServletContext ensureWrappedServletContext(javax.servlet.ServletContext ctx)
Make sure that there is a ServletContext wrapper for the specified servlet context for this application, creating one if necessary.
Parameters:
ctx - this application's ServletContext
Returns:
a ServletContext that wraps around the specified ServletContext or the passed ServletContext itself if it is a wrapper already

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.