org.codehaus.wadi.core.motable
Interface Motable

All Superinterfaces:
Evictable
All Known Subinterfaces:
Session, WADIHttpSession, WebSession
All Known Implementing Classes:
AbstractMotable, AbstractReplicableSession, AtomicallyReplicableSession, BasicStoreMotable, BasicWebSession, DistributableSession, SimpleMotable, StandardSession

public interface Motable
extends Evictable

Lit. 'able to be moved' - an Object the can be [promoted and] demoted up and down a Contextualiser stack. An Evictable with an ID and a payload.

Version:
$Revision: 2415 $
Author:
Jules Gosnell

Method Summary
 void copy(Motable motable)
           
 byte[] getBodyAsByteArray()
           
 java.lang.String getName()
           
 java.util.concurrent.locks.ReadWriteLock getReadWriteLock()
           
 void init(long creationTime, long lastAccessedTime, int maxInactiveInterval, java.lang.String name)
           
 boolean isNew()
           
 void mote(Motable recipient)
           
 void rehydrate(long creationTime, long lastAccessedTime, int maxInactiveInterval, java.lang.String name, byte[] body)
           
 void restore(long creationTime, long lastAccessedTime, int maxInactiveInterval, java.lang.String name, byte[] body)
           
 void setBodyAsByteArray(byte[] bytes)
           
 
Methods inherited from interface org.codehaus.wadi.core.eviction.Evictable
copy, destroy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, mote, setLastAccessedTime, setMaxInactiveInterval
 

Method Detail

init

void init(long creationTime,
          long lastAccessedTime,
          int maxInactiveInterval,
          java.lang.String name)

rehydrate

void rehydrate(long creationTime,
               long lastAccessedTime,
               int maxInactiveInterval,
               java.lang.String name,
               byte[] body)
               throws RehydrationException
Throws:
RehydrationException

restore

void restore(long creationTime,
             long lastAccessedTime,
             int maxInactiveInterval,
             java.lang.String name,
             byte[] body)
             throws RehydrationException
Throws:
RehydrationException

copy

void copy(Motable motable)
          throws java.lang.Exception
Throws:
java.lang.Exception

mote

void mote(Motable recipient)
          throws java.lang.Exception
Throws:
java.lang.Exception

getName

java.lang.String getName()

isNew

boolean isNew()

getBodyAsByteArray

byte[] getBodyAsByteArray()
                          throws java.lang.Exception
Throws:
java.lang.Exception

setBodyAsByteArray

void setBodyAsByteArray(byte[] bytes)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getReadWriteLock

java.util.concurrent.locks.ReadWriteLock getReadWriteLock()


Copyright © 2011. All Rights Reserved.