Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:

- String Id
- long CreationTime
- long LastAccessedTime
- int MaxInactiveInterval
- boolean New
- boolean Valid
- Attribute[] {Name, Value}

This interface is intended to be a logical terminal.

Version:
  Coherence 2.3
Author:
  cp 2003.07.28

Method Summary
`Object` | `getAttribute(String sName)` Deprecated. Returns the object bound with the specified name in this session, or `null` if no object is bound under the name.
`String[]` | `getAttributeNameArray()` Deprecated. Returns an array of attribute names for this session.
`long` | `getCreationTime()` Deprecated. Returns the creation time for this session.
`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.
`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(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(String sName, 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

    Object getAttribute(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:
    `IllegalStateException` - if this method is called on an invalidated session

### getAttributeNameArray

    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:
    `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

    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

### 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:
    `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(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:
    `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(String sName,
                      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:
    `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

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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