org.glassfish.web.ha.session.management
Class SessionAttributeMetadata

java.lang.Object
  extended by org.glassfish.web.ha.session.management.SessionAttributeMetadata
All Implemented Interfaces:
java.io.Serializable

public final class SessionAttributeMetadata
extends java.lang.Object
implements java.io.Serializable

AttributeMetadata contains the metadata of an attribute that is part of an Http Session. When a container decides to save a session it passes an instance of CompositeMetaData which contains a collection of AttributeMetadata.

The attribute in question could have been deleted, or modified or could be a new attribute inside the HttpSession. getOperation() tells exactly what operation needs to be performed for this attribute

The attribute state/data itself can be obtained with getState(). Since an attribute is part of a session, the attributes must be deleted when the session is removed. The CompositeMetadata contains the last access time and inactive timeout for the session.

See Also:
CompositeMetadata, Serialized Form

Nested Class Summary
static class SessionAttributeMetadata.Operation
          Operation to be performed on this attribute
 
Constructor Summary
SessionAttributeMetadata(java.lang.String attributeName, SessionAttributeMetadata.Operation opcode, byte[] data)
          Construct an AtributeMetadata
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAttributeName()
          Returns name of the attribute
 SessionAttributeMetadata.Operation getOperation()
          Get the operation to be performed on the attribute.
 byte[] getState()
          Get the attribute data
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionAttributeMetadata

public SessionAttributeMetadata(java.lang.String attributeName,
                                SessionAttributeMetadata.Operation opcode,
                                byte[] data)
Construct an AtributeMetadata

Parameters:
attributeName - the attribute name
opcode - The operation to be performed on the AttrbuteMetadata
data - The attribute data
Method Detail

getAttributeName

public java.lang.String getAttributeName()
Returns name of the attribute

Returns:
attribute name

getOperation

public SessionAttributeMetadata.Operation getOperation()
Get the operation to be performed on the attribute.

Returns:
the operation to be performed on this attribute

getState

public byte[] getState()
Get the attribute data

Returns:
the data

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2012 GlassFish Community. All Rights Reserved.