Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.coherence.servlet
Interface HttpSessionModel

All Known Implementing Classes:
AbstractHttpSessionModel, MonolithicHttpSessionModel, SplitHttpSessionModel, TraditionalHttpSessionModel

Deprecated. In releases following 3.6 customization will be declarative.

public interface HttpSessionModel

This is the abstract model for HttpSession implementations that support clustering.

The model contains the following properties:

This interface is intended to be a logical terminal.

Version:
Coherence 2.3
Author:
cp 2003.07.28

Method Summary
 java.lang.Object getAttribute(java.lang.String sName)
          Deprecated. Returns the object bound with the specified name in this session, or null if no object is bound under the name.
 java.lang.String[] getAttributeNameArray()
          Deprecated. Returns an array of attribute names for this session.
 long getCreationTime()
          Deprecated. Returns the creation time for this session.
 java.lang.String getId()
          Deprecated. Returns the session identifier for this session.
 long getLastAccessedTime()
          Deprecated. Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight, January 1, 1970 GMT.
 int getMaxInactiveInterval()
          Deprecated. Returns the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session.
 int getReferenceCount()
          Deprecated. Determine the reference count (unmatched enter calls) for this model.
 boolean isExpired()
          Deprecated. A helper method to determine if the session data has expired.
 boolean isNew()
          Deprecated. Returns true if the client does not yet know about the session or if the client chooses not to join the session.
 boolean isUsable()
          Deprecated. Determine if this session model is a usable object.
 boolean isValid()
          Deprecated. Determine if this session model is valid.
 void removeAttribute(java.lang.String sName)
          Deprecated. Removes the object bound with the specified name from this session.
 void sessionReturned()
          Deprecated. Indicates to the session that it is no longer new, because the session ID has been returned to the client to allow the client to accept it, as described in the Servlet specification.
 void setAttribute(java.lang.String sName, java.lang.Object oValue)
          Deprecated. Binds an object to this session, using the name specified.
 void setMaxInactiveInterval(int cSeconds)
          Deprecated. Set the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session.
 void touch()
          Deprecated. Update the last-accessed time for the session.

 

Method Detail

getAttribute

java.lang.Object getAttribute(java.lang.String sName)
Deprecated. 
Returns the object bound with the specified name in this session, or null if no object is bound under the name.
Parameters:
sName - a string specifying the name of the object
Returns:
the object with the specified name
Throws:
java.lang.IllegalStateException - if this method is called on an invalidated session

getAttributeNameArray

java.lang.String[] getAttributeNameArray()
Deprecated. 
Returns an array of attribute names for this session.
Returns:
an array of String objects specifying the names of all the objects bound to this session
Throws:
java.lang.IllegalStateException - if this method is called on an invalidated session

getCreationTime

long getCreationTime()
Deprecated. 
Returns the creation time for this session.
Returns:
the creation time for this session

getId

java.lang.String getId()
Deprecated. 
Returns the session identifier for this session.
Returns:
the session identifier for this session.

getLastAccessedTime

long getLastAccessedTime()
Deprecated. 
Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight, January 1, 1970 GMT. Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
Returns:
the last time the client sent a request associated with this session, as the number of milliseconds since midnight, January 1, 1970 GMT. Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time

getReferenceCount

int getReferenceCount()
Deprecated. 
Determine the reference count (unmatched enter calls) for this model.
Returns:
the reference count (unmatched enter calls) for this model

getMaxInactiveInterval

int getMaxInactiveInterval()
Deprecated. 
Returns the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session. A negative time indicates that the session should never time out.
Returns:
the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session. A negative time indicates that the session should never time out

isExpired

boolean isExpired()
Deprecated. 
A helper method to determine if the session data has expired.
Returns:
true if the session served by this session model has expired

isNew

boolean isNew()
Deprecated. 
Returns true if the client does not yet know about the session or if the client chooses not to join the session. For example, if the server used only cookie-based sessions, and the client had disabled the use of cookies, then a session would be new on each request.
Returns:
true if the server has created a session, but the client has not yet joined
Throws:
java.lang.IllegalStateException - if this method is called on an already invalidated session

isUsable

boolean isUsable()
Deprecated. 
Determine if this session model is a usable object. For example, a session model may become unusable if it is passivated and then held beyond the request scope.

When a session model becomes unusable, the only method that can be assumed to respond without throwing an exception is getId().

Returns:
true if this session model object is still usable, false if the session model should be re-obtained from its collection

isValid

boolean isValid()
Deprecated. 
Determine if this session model is valid.
Returns:
true if the session has not been destroyed, otherwise false

removeAttribute

void removeAttribute(java.lang.String sName)
Deprecated. 
Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.
Parameters:
sName - the name of the object to remove from this session
Throws:
java.lang.IllegalStateException - if this method is called on an invalidated session

sessionReturned

void sessionReturned()
Deprecated. 
Indicates to the session that it is no longer new, because the session ID has been returned to the client to allow the client to accept it, as described in the Servlet specification.

setAttribute

void setAttribute(java.lang.String sName,
                  java.lang.Object oValue)
Deprecated. 
Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.
Parameters:
sName - the name to which the object is bound; cannot be null
oValue - the object to be bound; cannot be null
Throws:
java.lang.IllegalStateException - if this method is called on an invalidated session

setMaxInactiveInterval

void setMaxInactiveInterval(int cSeconds)
Deprecated. 
Set the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session. A negative time indicates that the session should never time out.
Parameters:
cSeconds - the new maximum interval

touch

void touch()
Deprecated. 
Update the last-accessed time for the session.

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


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