org.codehaus.wadi.impl
Class SimpleMotable

java.lang.Object
  extended byorg.codehaus.wadi.impl.SimpleEvictable
      extended byorg.codehaus.wadi.impl.AbstractMotable
          extended byorg.codehaus.wadi.impl.SimpleMotable
All Implemented Interfaces:
Evictable, Motable, Serializable

public class SimpleMotable
extends AbstractMotable
implements Serializable

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

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

Field Summary
protected  byte[] _bytes
           
 
Fields inherited from class org.codehaus.wadi.impl.AbstractMotable
_log, _name
 
Fields inherited from class org.codehaus.wadi.impl.SimpleEvictable
_creationTime, _lastAccessedTime, _maxInactiveInterval
 
Constructor Summary
SimpleMotable()
           
 
Method Summary
 boolean equals(Object object)
           
 byte[] getBodyAsByteArray()
           
 ByteBuffer getBodyAsByteBuffer()
           
 void setBodyAsByteArray(byte[] bytes)
           
 void setBodyAsByteBuffer(ByteBuffer body)
           
 
Methods inherited from class org.codehaus.wadi.impl.AbstractMotable
copy, destroy, getName, init, mote, readContent, writeContent
 
Methods inherited from class org.codehaus.wadi.impl.SimpleEvictable
checkTimeframe, copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, isNew, mote, setLastAccessedTime, setMaxInactiveInterval
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.wadi.Evictable
checkTimeframe, copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, isNew, mote, setLastAccessedTime, setMaxInactiveInterval
 

Field Detail

_bytes

protected byte[] _bytes
Constructor Detail

SimpleMotable

public SimpleMotable()
Method Detail

getBodyAsByteArray

public byte[] getBodyAsByteArray()
Specified by:
getBodyAsByteArray in interface Motable

setBodyAsByteArray

public void setBodyAsByteArray(byte[] bytes)
Specified by:
setBodyAsByteArray in interface Motable

getBodyAsByteBuffer

public ByteBuffer getBodyAsByteBuffer()
                               throws Exception
Specified by:
getBodyAsByteBuffer in interface Motable
Throws:
Exception

setBodyAsByteBuffer

public void setBodyAsByteBuffer(ByteBuffer body)
                         throws Exception
Specified by:
setBodyAsByteBuffer in interface Motable
Throws:
Exception

equals

public boolean equals(Object object)


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