org.codehaus.wadi
Interface Motable

All Superinterfaces:
Evictable
All Known Subinterfaces:
Context, Session, StoreMotable, WADIHttpSession
All Known Implementing Classes:
AbstractContext, AbstractMotable, DatabaseMotable, DiscMotable, StandardSession

public interface Motable
extends Evictable

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

Version:
$Revision: 1200 $
Author:
Jules Gosnell

Method Summary
 void copy(Motable motable)
           
 byte[] getBodyAsByteArray()
           
 ByteBuffer getBodyAsByteBuffer()
           
 String getName()
           
 void init(long creationTime, long lastAccessedTime, int maxInactiveInterval, String name)
           
 void mote(Motable recipient)
           
 void setBodyAsByteArray(byte[] bytes)
           
 void setBodyAsByteBuffer(ByteBuffer body)
           
 
Methods inherited from interface org.codehaus.wadi.Evictable
checkTimeframe, copy, destroy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, isNew, mote, setLastAccessedTime, setMaxInactiveInterval
 

Method Detail

init

public void init(long creationTime,
                 long lastAccessedTime,
                 int maxInactiveInterval,
                 String name)

copy

public void copy(Motable motable)
          throws Exception
Throws:
Exception

mote

public void mote(Motable recipient)
          throws Exception
Throws:
Exception

getName

public String getName()

getBodyAsByteArray

public byte[] getBodyAsByteArray()
                          throws Exception
Throws:
Exception

setBodyAsByteArray

public void setBodyAsByteArray(byte[] bytes)
                        throws Exception
Throws:
Exception

getBodyAsByteBuffer

public ByteBuffer getBodyAsByteBuffer()
                               throws Exception
Throws:
Exception

setBodyAsByteBuffer

public void setBodyAsByteBuffer(ByteBuffer body)
                         throws Exception
Throws:
Exception


Copyright © 2004-2006 Core Developers Network Ltd.. All Rights Reserved.