Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.coherence.servlet
Class AbstractHttpSessionModel

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.coherence.servlet.AbstractHttpSessionModel

All Implemented Interfaces:
  HttpSessionModel, ExternalizableLite, java.io.Externalizable, java.io.Serializable

Direct Known Subclasses:
  MonolithicHttpSessionModel, TraditionalHttpSessionModel

    public abstract class AbstractHttpSessionModel

extends Base
implements HttpSessionModel, java.io.Externalizable, ExternalizableLite

An abstract base class from which implementations of HttpSessionModel can be more easily built.

Note that the Externalizable implementation on this class is just there to throw exceptions that this class is not Serializable or Externalizable. Use ExternalizableLite instead.

Version:
  Coherence 2.3
Author:
  cp 2003.10.15

Nested Class Summary
`class` | `AbstractHttpSessionModel.AttributeHolder` An immutable object to hold attribute values and related information.

Field Summary
`static java.lang.String` | `CONFIG_NO_LOCKING` The name of the system property for disabling session locking.
`java.util.Map.Entry[]` | `ENTRY_ARRAY` Zero-length array of Map Entry objects.
`protected static boolean` | `m_fNoLock` Flag denoting whether session locking is disabled.
`static int` | `MAGIC_V350` Coherence*Web version identifier for serialization.
`java.lang.String[]` | `STRING_ARRAY` Zero-length array of String objects.

Constructor Summary
`AbstractHttpSessionModel()` Default constructor for deserialization.
`AbstractHttpSessionModel(AbstractHttpSessionCollection collection, javax.servlet.http.HttpSession session, java.lang.String sId)` Session creation constructor.

Method Summary
`protected void` | `activate(javax.servlet.http.HttpSession session)` Activate the session model.
`protected void` | `bind(AbstractHttpSessionModel.AttributeHolder holderOld, AbstractHttpSessionModel.AttributeHolder holderNew)` Bind the specified session attribute, replacing the specified attribute if it exists.
`protected void` | `checkActive()` Make sure that the model is 'active', 'usable' and 'valid'.
`protected void` | `checkUsable()` Make sure that the model is 'usable'.
`protected void` | `checkValid()` Make sure that the model is 'usable' and 'valid'.
`protected void` | `discard()` When the session model is no longer usable, it is discarded.
`protected void` | `enter()` Increment the usage count of the session by this thread.
`protected void` | `exit()` Decrement the usage count of the session by this thread.
`protected java.lang.String` | `extractAttributeName(java.lang.String sAttribute)` Given a potentially qualified attribute name, return the original (fully unqualified) attribute name.
`protected java.lang.String[]` | `extractAttributeNames(java.lang.String[] asAttribute)` Given an array of potentially qualified attribute name, return an array of the original (fully unqualified) attribute names.
`protected void` | `flush()` Flush the changes to this model to whatever data structure (for example, a cache) that is responsible for managing the model's data.
`protected java.util.Map` | `getActualAttributeMap()` Get the map of session attributes that are part of this session (not "local".)
`java.lang.Object` | `getAttribute(java.lang.String sName)` Returns the object bound with the specified name in this session, or `null` if no object is bound under the name.
`protected java.util.Map` | `getAttributeMap()` Get a view of the session's attributes as a Map.
`java.lang.String[]` | `getAttributeNameArray()` Returns an array of attribute names for this session.
`protected AbstractHttpSessionCollection` | `getCollection()` Determine the collection that this model belongs to.
`long` | `getCreationTime()` Returns the creation time for this session.
`protected java.lang.String` | `getDescription()` Returns a string representation of this object's attributes.
`protected javax.servlet.http.HttpSession` | `getHttpSession()` Determine the HttpSession that this model is bound to.
`java.lang.String` | `getId()` Returns the session identifier for this session.
`long` | `getLastAccessedTime()` Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight, January 1, 1970 GMT.
`protected long` | `getLastFlushedTime()` Returns the last time this session was flushed, as the number of milliseconds since midnight, January 1, 1970 GMT.
`protected java.util.Map` | `getLocalAttributeMap()` Get the map of session attributes that are owned by this model but are stored in a "local" manner.
`int` | `getMaxInactiveInterval()` Returns the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session.
`protected int` | `getReferenceCount()` Determine the reference count (unmatched enter calls) for this model.
`protected int` | `getVersion()` Return the version indicator for this model.
`protected AbstractHttpSessionModel.AttributeHolder` | `instantiateAttributeHolder()` Factory method: Instantiate an AttributeHolder for deserialization purposes.
`protected AbstractHttpSessionModel.AttributeHolder` | `instantiateAttributeHolder(java.lang.String sName, java.lang.Object oValue)` Factory method: Instantiate an AttributeHolder to manage the passed value.
`protected boolean` | `isActivatableAttributes()` Determine if the session model may have attributes that need to be activated and passivated.
`protected boolean` | `isActive()` Determine if the session model is active (not passivated).
`boolean` | `isExpired()` A helper method to determine if the session data has expired.
`static boolean` | `isImmutable(java.lang.Object o)` Determine if the passed object is definitely of an immutable type.
`protected boolean` | `isLastAccessTimeFlushRequired()` Determine if the LastAccessTime property (and only that property) needs to be flushed.
`protected boolean` | `isLocal()` Determine whether the session is local (not distributed).
`protected boolean` | `isModified()` Determine if the session has been modified since it was deserialized or last marked as not-modified.
`boolean` | `isNew()` Returns `true` if the client does not yet know about the session or if the client chooses not to join the session.
`protected boolean` | `isOwnedByThisThread()` Determine if this model is owned by the current thread.
`boolean` | `isUsable()` Determine if this session model is a usable object.
`boolean` | `isValid()` Determine if this session model is valid.
`protected void` | `logAttributeSerializationFailure(AbstractHttpSessionModel.AttributeHolder holder, java.lang.Throwable e)` Log a serialization failure for an attribute holder.
`protected void` | `makeDistributed()` Mark the session as being distributed (not local).
`protected boolean` | `obtainThreadOwnership()` Obtain thread ownership of this model, if necessary.
`protected void` | `passivate()` Passivate the session model.
`protected java.lang.String` | `qualifyAttributeName(java.lang.String sAttribute)` Given an attribute name, return a potentially qualified name.
`protected void` | `readAttributes(java.io.DataInput in)` Helper to read the session attributes from a stream.
`void` | `readExternal(java.io.DataInput in)` Helper to read the object state from a stream.
`void` | `readExternal(java.io.ObjectInput in)` The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.
`protected void` | `releaseThreadOwnership()` Release thread ownership of this model.
`void` | `removeAttribute(java.lang.String sName)` Removes the object bound with the specified name from this session.
`void` | `sessionReturned()` 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.
`protected void` | `setActivatableAttributes(boolean fActivatable)` Specify whether the session model may or may not have attributes that need to be activated and passivated.
`void` | `setAttribute(java.lang.String sName, java.lang.Object oValue)` Binds an object to this session, using the name specified.
`protected void` | `setCollection(AbstractHttpSessionCollection collection)` After deserialization, the collection needs to be configured.
`protected void` | `setHttpSession(javax.servlet.http.HttpSession session)` Configure the HttpSession that this model is bound to.
`protected void` | `setId(java.lang.String sId)` Allow a sub-class to specify the session ID, for example during deserialization.
`protected void` | `setLastAccessedTime(long ldtLastAccessedTime)` Set the time this session was last accessed, as the number of milliseconds since midnight, January 1, 1970 GMT.
`protected void` | `setLastFlushedTime(long ldtLastFlushedTime)` Set the time this session was last flushed, as the number of milliseconds since midnight, January 1, 1970 GMT.
`void` | `setMaxInactiveInterval(int cSeconds)` Set the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session.
`protected void` | `setModified(boolean fModified)` Specify whether or not the session has been modified.
`protected void` | `setValid(boolean fValid)` Allow a sub-class to explicitly validate the session model, for example at the completion of deserialization.
`protected void` | `setVersion(int nVersion)` Set the version indicator of this model.
`java.lang.String` | `toString()` Returns a string representation of the object.
`void` | `touch()` Update the last-accessed time for the session.
`protected void` | `unbind()` Unbind session attributes.
`protected void` | `unbind(AbstractHttpSessionModel.AttributeHolder holder, boolean fAll)` Unbind the specified session attributes name and value.
`protected void` | `writeAttributes(java.io.DataOutput out)` Helper to write the session attributes to a stream.
`void` | `writeExternal(java.io.DataOutput out)` Helper to write the object state to a stream.
`void` | `writeExternal(java.io.ObjectOutput out)` The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Field Detail

### STRING_ARRAY

    public java.lang.String[] STRING_ARRAY

  Zero-length array of String objects.

### ENTRY_ARRAY

    public java.util.Map.Entry[] ENTRY_ARRAY

  Zero-length array of Map Entry objects.

### MAGIC_V350

    public static final int MAGIC_V350

  Coherence*Web version identifier for serialization.

  Since:
    Coherence 3.5
  See Also:
    Constant Field Values

### CONFIG_NO_LOCKING

    public static final java.lang.String CONFIG_NO_LOCKING

  The name of the system property for disabling session locking.

  See Also:
    Constant Field Values

### m_fNoLock

    protected static final boolean m_fNoLock

  Flag denoting whether session locking is disabled.

Constructor Detail

### AbstractHttpSessionModel

    public AbstractHttpSessionModel()

  Default constructor for deserialization.

### AbstractHttpSessionModel

    public AbstractHttpSessionModel(AbstractHttpSessionCollection collection,
                                    javax.servlet.http.HttpSession session,
                                    java.lang.String sId)

  Session creation constructor.

  Parameters:
    `collection` - the collection that manages this model
    `session` - the session that delegates to this model
    `sId` - the session ID

Method Detail

### getAttribute

    public java.lang.Object getAttribute(java.lang.String sName)

  Returns the object bound with the specified name in this session, or `null` if no object is bound under the name.

  Specified by:
    `getAttribute` in interface `HttpSessionModel`
  Parameters:
    `sName` - a string specifying the name of the object
  Returns:
    the object with the specified name

### getAttributeNameArray

    public java.lang.String[] getAttributeNameArray()

  Returns an array of attribute names for this session.

  Specified by:
    `getAttributeNameArray` in interface `HttpSessionModel`
  Returns:
    an array of `String` objects specifying the names of all the objects bound to this session

### getCreationTime

    public long getCreationTime()

  Returns the creation time for this session.

  Specified by:
    `getCreationTime` in interface `HttpSessionModel`
  Returns:
    the creation time for this session

### getId

    public java.lang.String getId()

  Returns the session identifier for this session.

  Specified by:
    `getId` in interface `HttpSessionModel`
  Returns:
    the session identifier for this session.

### getLastAccessedTime

    public long getLastAccessedTime()

  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.

  Specified by:
    `getLastAccessedTime` in interface `HttpSessionModel`
  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

    public int getMaxInactiveInterval()

  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.

  Specified by:
    `getMaxInactiveInterval` in interface `HttpSessionModel`
  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

    public boolean isExpired()

  A helper method to determine if the session data has expired.

  Specified by:
    `isExpired` in interface `HttpSessionModel`
  Returns:
    true if the session served by this session model has expired

### isNew

    public boolean isNew()

  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.

  Specified by:
    `isNew` in interface `HttpSessionModel`
  Returns:
    `true` if the server has created a session, but the client has not yet joined

### isUsable

    public boolean isUsable()

  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 `HttpSessionModel.getId()`.

  Specified by:
    `isUsable` in interface `HttpSessionModel`
  Returns:
    true if this session model object is still usable, false if the session model should be re-obtained from its collection

### isValid

    public boolean isValid()

  Determine if this session model is valid.

  Specified by:
    `isValid` in interface `HttpSessionModel`
  Returns:
    `true` if the session has not been destroyed, otherwise `false`

### removeAttribute

    public void removeAttribute(java.lang.String sName)

  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.

  Specified by:
    `removeAttribute` in interface `HttpSessionModel`
  Parameters:
    `sName` - the name of the object to remove from this session

### sessionReturned

    public void sessionReturned()

  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.

  Specified by:
    `sessionReturned` in interface `HttpSessionModel`

### setAttribute

    public void setAttribute(java.lang.String sName,
                             java.lang.Object oValue)

  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.

  Specified by:
    `setAttribute` in interface `HttpSessionModel`
  Parameters:
    `sName` - the name to which the object is bound; cannot be null
    `oValue` - the object to be bound; cannot be null

### setMaxInactiveInterval

    public void setMaxInactiveInterval(int cSeconds)

  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.

  Specified by:
    `setMaxInactiveInterval` in interface `HttpSessionModel`
  Parameters:
    `cSeconds` - the new maximum interval

### touch

    public void touch()

  Update the last-accessed time for the session.

  Specified by:
    `touch` in interface `HttpSessionModel`

### toString

    public java.lang.String toString()

  Returns a string representation of the object.

  Returns:
    a string representation of the object

### getCollection

    protected AbstractHttpSessionCollection getCollection()

  Determine the collection that this model belongs to.

  Returns:
    the AbstractHttpSessionCollection that this model belongs to

### setCollection

    protected void setCollection(AbstractHttpSessionCollection collection)

  After deserialization, the collection needs to be configured.

  Parameters:
    `collection` - the AbstractHttpSessionCollection that this model belongs to

### getHttpSession

    protected javax.servlet.http.HttpSession getHttpSession()

  Determine the HttpSession that this model is bound to.

  Returns:
    the HttpSession that this model is bound to, or null if the model is not active

### setHttpSession

    protected void setHttpSession(javax.servlet.http.HttpSession session)

  Configure the HttpSession that this model is bound to.

  Parameters:
    `session` - the HttpSession that this model is bound to; may be null to deactivate the model

### setId

    protected void setId(java.lang.String sId)

  Allow a sub-class to specify the session ID, for example during deserialization.

  Parameters:
    `sId` - the session id

### setValid

    protected void setValid(boolean fValid)

  Allow a sub-class to explicitly validate the session model, for example at the completion of deserialization.

  Parameters:
    `fValid` - true if the session model is valid, false otherwise

### getVersion

    protected int getVersion()

  Return the version indicator for this model.

  The version indicator is used to detect concurrent modifications when member-level locking is disabled.

  Returns:
    the version indicator for this model

### setVersion

    protected void setVersion(int nVersion)

  Set the version indicator of this model.

  Parameters:
    `nVersion` - the new version indicator; must be >= 0

### isLocal

    protected boolean isLocal()

  Determine whether the session is local (not distributed). This is possible only if a session distribution controller is used.

  Returns:
    true if the session is not yet distributed

### makeDistributed

    protected void makeDistributed()

  Mark the session as being distributed (not local).

### getAttributeMap

    protected java.util.Map getAttributeMap()

  Get a view of the session's attributes as a Map.

  Returns:
    a view of the session's attributes as a Map

### getActualAttributeMap

    protected java.util.Map getActualAttributeMap()

  Get the map of session attributes that are part of this session (not "local".)

  Returns:
    the map of not "local" session attributes

### getLocalAttributeMap

    protected java.util.Map getLocalAttributeMap()

  Get the map of session attributes that are owned by this model but are stored in a "local" manner.

  Returns:
    the map of "local" session attributes

### isActive

    protected boolean isActive()

  Determine if the session model is active (not passivated).

  Returns:
    true if the session model is active

### isActivatableAttributes

    protected boolean isActivatableAttributes()

  Determine if the session model may have attributes that need to be activated and passivated.

  Returns:
    true if any of the session attributes may require activation

### setActivatableAttributes

    protected void setActivatableAttributes(boolean fActivatable)

  Specify whether the session model may or may not have attributes that need to be activated and passivated. This is intended to allow some model implementations to optimize their activation and passivation.

  Parameters:
    `fActivatable` - passtrue if any of the session attributes may require activation

### activate

    protected void activate(javax.servlet.http.HttpSession session)

  Activate the session model. If the model is already active, this does not have any effect.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

  Parameters:
    `session` - the HttpSession to bind this model to

### passivate

    protected void passivate()

  Passivate the session model. This issues events and releases the reference to the HttpSession. If the model is not active, this does not have any effect.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

### bind

    protected void bind(AbstractHttpSessionModel.AttributeHolder holderOld,
                        AbstractHttpSessionModel.AttributeHolder holderNew)

  Bind the specified session attribute, replacing the specified attribute if it exists.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

  Parameters:
    `holderOld` - the attribute information to unbind; may be null
    `holderNew` - the attribute information to bind

### unbind

    protected void unbind(AbstractHttpSessionModel.AttributeHolder holder,
                          boolean fAll)

  Unbind the specified session attributes name and value.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

  Parameters:
    `holder` - the attribute information to unbind
    `fAll` - true if this method is called within the context of an `unbind()` call

### unbind

    protected void unbind()

  Unbind session attributes.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

### logAttributeSerializationFailure

    protected void logAttributeSerializationFailure(AbstractHttpSessionModel.AttributeHolder holder,
                                                    java.lang.Throwable e)

  Log a serialization failure for an attribute holder.

  Parameters:
    `holder` - the attribute holder that failed to serialize its value
    `e` - the throwable object that resulted from the serialization failure

### discard

    protected void discard()

  When the session model is no longer usable, it is discarded.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

### isModified

    protected boolean isModified()

  Determine if the session has been modified since it was deserialized or last marked as not-modified.

  Returns:
    true if the session has been modified

### setModified

    protected void setModified(boolean fModified)

  Specify whether or not the session has been modified.

  Parameters:
    `fModified` - true if the session has been modified, false to reset the modified indicator

### setLastAccessedTime

    protected void setLastAccessedTime(long ldtLastAccessedTime)

  Set the time this session was last accessed, as the number of milliseconds since midnight, January 1, 1970 GMT.

  Parameters:
    `ldtLastAccessedTime` - the last time this session was accessed, as the number of milliseconds since midnight, January 1, 1970 GMT

### getLastFlushedTime

    protected long getLastFlushedTime()

  Returns the last time this session was flushed, as the number of milliseconds since midnight, January 1, 1970 GMT.

  Returns:
    the last time this session was flushed, as the number of milliseconds since midnight, January 1, 1970 GMT

### setLastFlushedTime

    protected void setLastFlushedTime(long ldtLastFlushedTime)

  Set the time this session was last flushed, as the number of milliseconds since midnight, January 1, 1970 GMT.

  Parameters:
    `ldtLastFlushedTime` - the last time this session was flushed, as the number of milliseconds since midnight, January 1, 1970 GMT

### isLastAccessTimeFlushRequired

    protected boolean isLastAccessTimeFlushRequired()

  Determine if the LastAccessTime property (and only that property) needs to be flushed.

  Returns:
    true if only the timestamp needs to be flushed

### obtainThreadOwnership

    protected boolean obtainThreadOwnership()

  Obtain thread ownership of this model, if necessary.

  If thread locking is enforced this method has no effect and false is returned; otherwise, this model is locked in the local owned cache and true is returned. A return value of true implies that `releaseThreadOwnership()` must be called when exclusive access to the model is no longer required.

  Returns:
    true if this model was locked in the local owned cache; false otherwise
  See Also:
    `AbstractHttpSessionCollection.obtainThreadOwnership(String)`

### releaseThreadOwnership

    protected void releaseThreadOwnership()

  Release thread ownership of this model.

  See Also:
    `AbstractHttpSessionCollection.releaseThreadOwnership(String)`

### isOwnedByThisThread

    protected boolean isOwnedByThisThread()

  Determine if this model is owned by the current thread.

  Returns:
    true if the session model is owned by this thread

### getReferenceCount

    protected int getReferenceCount()

  Determine the reference count (unmatched enter calls) for this model.

  Returns:
    the reference count (unmatched enter calls) for this model

### enter

    protected void enter()

  Increment the usage count of the session by this thread.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

### exit

    protected void exit()

  Decrement the usage count of the session by this thread.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

### flush

    protected void flush()

  Flush the changes to this model to whatever data structure (for example, a cache) that is responsible for managing the model's data.

  This method may only be called by a thread that owns this model. See `AbstractHttpSessionCollection.obtainThreadOwnership(java.lang.String)`.

### readExternal

    public void readExternal(java.io.ObjectInput in)
                      throws java.io.IOException

  The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

  Specified by:
    `readExternal` in interface `java.io.Externalizable`
  Parameters:
    `in` - the stream to read data from in order to restore the object
  Throws:
    `java.io.IOException` - if an I/O exception occurs

### writeExternal

    public void writeExternal(java.io.ObjectOutput out)
                       throws java.io.IOException

  The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

  Specified by:
    `writeExternal` in interface `java.io.Externalizable`
  Parameters:
    `out` - the stream to write the object to
  Throws:
    `java.io.IOException` - if an I/O exception occurs

### readExternal

    public void readExternal(java.io.DataInput in)
                      throws java.io.IOException

  Helper to read the object state from a stream.

  Specified by:
    `readExternal` in interface `ExternalizableLite`
  Parameters:
    `in` - the stream to read data from in order to restore the object
  Throws:
    `java.io.IOException` - if an I/O exception occurs

### writeExternal

    public void writeExternal(java.io.DataOutput out)
                       throws java.io.IOException

  Helper to write the object state to a stream.

  Specified by:
    `writeExternal` in interface `ExternalizableLite`
  Parameters:
    `out` - the stream to write the object to
  Throws:
    `java.io.IOException` - if an I/O exception occurs

### readAttributes

    protected void readAttributes(java.io.DataInput in)
                           throws java.io.IOException

  Helper to read the session attributes from a stream.

  Parameters:
    `in` - the stream to read data from in order to restore the object
  Throws:
    `java.io.IOException` - if an I/O exception occurs

### writeAttributes

    protected void writeAttributes(java.io.DataOutput out)
                            throws java.io.IOException

  Helper to write the session attributes to a stream.

  Parameters:
    `out` - the stream to write the object to
  Throws:
    `java.io.IOException` - if an I/O exception occurs

### getDescription

    protected java.lang.String getDescription()

  Returns a string representation of this object's attributes.

  Returns:
    a string representation of this object's attributes

### checkActive

    protected void checkActive()

  Make sure that the model is 'active', 'usable' and 'valid'.

  Throws:
    `java.lang.IllegalStateException` - if the model is not 'active', 'usable' and 'valid'

### checkValid

    protected void checkValid()

  Make sure that the model is 'usable' and 'valid'.

  Throws:
    `java.lang.IllegalStateException` - if the model is not both 'usable' and 'valid'

### checkUsable

    protected void checkUsable()

  Make sure that the model is 'usable'.

  Throws:
    `java.lang.IllegalStateException` - if the model is not 'usable'

### qualifyAttributeName

    protected java.lang.String qualifyAttributeName(java.lang.String sAttribute)

  Given an attribute name, return a potentially qualified name.

  Parameters:
    `sAttribute` - the name that the application identifies the attribute by
  Returns:
    either the name as passed in, or a qualified name

### extractAttributeName

    protected java.lang.String extractAttributeName(java.lang.String sAttribute)

  Given a potentially qualified attribute name, return the original (fully unqualified) attribute name.

  Parameters:
    `sAttribute` - an attribute name that may be qualified
  Returns:
    the unqualified attribute name

### extractAttributeNames

    protected java.lang.String[] extractAttributeNames(java.lang.String[] asAttribute)

  Given an array of potentially qualified attribute name, return an array of the original (fully unqualified) attribute names.

  Parameters:
    `asAttribute` - an array of attribute names that may be qualified
  Returns:
    an array of unqualified attribute names

### isImmutable

    public static boolean isImmutable(java.lang.Object o)

  Determine if the passed object is definitely of an immutable type.

  Parameters:
    `o` - an object to check for immutability
  Returns:
    true if the object is of a type that is known to be immutable

### instantiateAttributeHolder

    protected AbstractHttpSessionModel.AttributeHolder instantiateAttributeHolder()

  Factory method: Instantiate an AttributeHolder for deserialization purposes.

  Returns:
    a new AttributeHolder that can be deserialized into

### instantiateAttributeHolder

    protected AbstractHttpSessionModel.AttributeHolder instantiateAttributeHolder(java.lang.String sName,
                                                                                  java.lang.Object oValue)

  Factory method: Instantiate an AttributeHolder to manage the passed value.

  Parameters:
    `sName` - the attribute name
    `oValue` - a non-null Object value
  Returns:
    a new AttributeHolder that will manage the passed value

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.