org.codehaus.wadi.core.session
Class DistributableSession

java.lang.Object
  extended by org.codehaus.wadi.core.eviction.SimpleEvictable
      extended by org.codehaus.wadi.core.motable.AbstractMotable
          extended by org.codehaus.wadi.core.session.StandardSession
              extended by org.codehaus.wadi.core.session.DistributableSession
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Evictable, Motable, Session
Direct Known Subclasses:
AbstractReplicableSession

public class DistributableSession
extends StandardSession

A Standard Session enhanced with functionality associated with [de]serialisation - necessary to allow the movement of the session from jvm to jvm/storage.

Version:
$Revision: 1725 $
Author:
Jules Gosnell
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.wadi.core.session.StandardSession
StandardSession.StateMap
 
Field Summary
protected  Streamer streamer
           
 
Fields inherited from class org.codehaus.wadi.core.session.StandardSession
attributes, localStateMap, manager
 
Fields inherited from class org.codehaus.wadi.core.motable.AbstractMotable
readWriteLock
 
Fields inherited from class org.codehaus.wadi.core.eviction.SimpleEvictable
memento
 
Constructor Summary
DistributableSession(DistributableAttributes attributes, Manager manager, Streamer streamer)
           
 
Method Summary
 byte[] getBodyAsByteArray()
           
 DistributableSessionMemento getDistributableSessionMemento()
           
protected  SimpleEvictableMemento newMemento()
           
 void setBodyAsByteArray(byte[] bytes)
           
 void setDistributableSessionMemento(DistributableSessionMemento memento)
           
 
Methods inherited from class org.codehaus.wadi.core.session.StandardSession
addState, destroy, destroyForMotion, getLocalStateMap, getStandardSessionMemento, getState, getState, onAddSate, onDestroy, onEndProcessing, onRemoveState, removeState
 
Methods inherited from class org.codehaus.wadi.core.motable.AbstractMotable
copy, getAbstractMotableMemento, getName, getReadWriteLock, init, initExisting, isNew, mote, newReadWriteLock, onDeserialization, rehydrate, restore
 
Methods inherited from class org.codehaus.wadi.core.eviction.SimpleEvictable
copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, mote, onSerialization, readExternal, setLastAccessedTime, setMaxInactiveInterval, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.wadi.core.motable.Motable
copy, getName, getReadWriteLock, init, isNew, mote, rehydrate, restore
 
Methods inherited from interface org.codehaus.wadi.core.eviction.Evictable
copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, mote, setLastAccessedTime, setMaxInactiveInterval
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Field Detail

streamer

protected final Streamer streamer
Constructor Detail

DistributableSession

public DistributableSession(DistributableAttributes attributes,
                            Manager manager,
                            Streamer streamer)
Method Detail

newMemento

protected SimpleEvictableMemento newMemento()
Overrides:
newMemento in class StandardSession

getDistributableSessionMemento

public DistributableSessionMemento getDistributableSessionMemento()

setDistributableSessionMemento

public void setDistributableSessionMemento(DistributableSessionMemento memento)

getBodyAsByteArray

public byte[] getBodyAsByteArray()
                          throws java.lang.Exception
Specified by:
getBodyAsByteArray in interface Motable
Overrides:
getBodyAsByteArray in class StandardSession
Throws:
java.lang.Exception

setBodyAsByteArray

public void setBodyAsByteArray(byte[] bytes)
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException
Specified by:
setBodyAsByteArray in interface Motable
Overrides:
setBodyAsByteArray in class StandardSession
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 2008. All Rights Reserved.