org.codehaus.wadi.core.motable
Class SimpleMotable

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.motable.SimpleMotable
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Evictable, Motable

public class SimpleMotable
extends AbstractMotable

A very Simple implementation of Motable, with the Bytes field represented as a byte[]

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

Field Summary
protected  byte[] _bytes
           
 
Fields inherited from class org.codehaus.wadi.core.motable.AbstractMotable
readWriteLock
 
Fields inherited from class org.codehaus.wadi.core.eviction.SimpleEvictable
memento
 
Constructor Summary
SimpleMotable()
           
 
Method Summary
 byte[] getBodyAsByteArray()
           
 void readExternal(java.io.ObjectInput oi)
           
 void setBodyAsByteArray(byte[] bytes)
           
 void writeExternal(java.io.ObjectOutput oo)
           
 
Methods inherited from class org.codehaus.wadi.core.motable.AbstractMotable
copy, destroy, destroyForMotion, getAbstractMotableMemento, getName, getReadWriteLock, init, initExisting, isNew, mote, newMemento, newReadWriteLock, onDeserialization, rehydrate, restore
 
Methods inherited from class org.codehaus.wadi.core.eviction.SimpleEvictable
copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, mote, onSerialization, setLastAccessedTime, setMaxInactiveInterval
 
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.eviction.Evictable
copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, mote, setLastAccessedTime, setMaxInactiveInterval
 

Field Detail

_bytes

protected byte[] _bytes
Constructor Detail

SimpleMotable

public SimpleMotable()
Method Detail

getBodyAsByteArray

public byte[] getBodyAsByteArray()

setBodyAsByteArray

public void setBodyAsByteArray(byte[] bytes)

readExternal

public void readExternal(java.io.ObjectInput oi)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class SimpleEvictable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput oo)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class SimpleEvictable
Throws:
java.io.IOException


Copyright © 2010. All Rights Reserved.