org.jboss.web.tomcat.service.session.distributedcache.spi
Interface IncomingDistributableSessionData


public interface IncomingDistributableSessionData

Encapsulates the four types of data about a session that can be retrieved from a distributed cache.

Author:
Brian Stansberry

Method Summary
 DistributableSessionMetadata getMetadata()
          Gets the other session metadata besides the version and timestamp.
 Map<String,Object> getSessionAttributes()
          Returns the session's attribute map, or throws an IllegalStateException if providesSessionAttributes() would return false.
 long getTimestamp()
          Gets the timestamp of the most recent session access.
 int getVersion()
          Gets the session's version.
 boolean providesSessionAttributes()
          Gets whether it is safe to invoke getSessionAttributes() on this object.
 

Method Detail

getVersion

int getVersion()
Gets the session's version.


getTimestamp

long getTimestamp()
Gets the timestamp of the most recent session access.


getMetadata

DistributableSessionMetadata getMetadata()
Gets the other session metadata besides the version and timestamp.


providesSessionAttributes

boolean providesSessionAttributes()
Gets whether it is safe to invoke getSessionAttributes() on this object.

Returns:
true if getSessionAttributes() will return a map; false if it will throw an IllegalStateException.

getSessionAttributes

Map<String,Object> getSessionAttributes()
Returns the session's attribute map, or throws an IllegalStateException if providesSessionAttributes() would return false.

Returns:
the session attribute map. Will not return null
Throws:
IllegalStateException - if providesSessionAttributes() would return false.


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.