tuwien.auto.calimero.buffer
Class LDataObject

java.lang.Object
  extended by tuwien.auto.calimero.buffer.cache.CacheObject
      extended by tuwien.auto.calimero.buffer.LDataObject
Direct Known Subclasses:
LDataObjectQueue

public class LDataObject
extends CacheObject

Used for holding CEMILData frames.


Field Summary
 
Fields inherited from class tuwien.auto.calimero.buffer.cache.CacheObject
value
 
Constructor Summary
  LDataObject(CEMILData frame)
          Creates a LDataObject holding the frame argument.
protected LDataObject(KNXAddress key, java.lang.Object value)
          Creates a LDataObject set to key addrKey and holding value.
 
Method Summary
 CEMILData getFrame()
          Returns a CEMILData frame contained in this cache object.
 void setFrame(CEMILData frame)
          Sets a new CEMILData frame for this cache object.
 
Methods inherited from class tuwien.auto.calimero.buffer.cache.CacheObject
getCount, getKey, getTimestamp, getUsage, getValue, incCount, resetCount, resetTimestamp, setUsage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDataObject

public LDataObject(CEMILData frame)
Creates a LDataObject holding the frame argument.

Parameters:
frame - CEMILData frame

LDataObject

protected LDataObject(KNXAddress key,
                      java.lang.Object value)
Creates a LDataObject set to key addrKey and holding value.

If value is not of type CEMILData, the methods setFrame(CEMILData) and getFrame() have to be overridden.

Parameters:
key - key of this cache object
value - value hold by this cache object
Method Detail

getFrame

public CEMILData getFrame()
Returns a CEMILData frame contained in this cache object.

On no frame available, null is returned.

Returns:
the CEMILData frame, or null

setFrame

public void setFrame(CEMILData frame)
Sets a new CEMILData frame for this cache object.

The key generated out of frame (i.e. out of the KNX address of frame) has to be equal to the key of this LDataObject, as returned from CacheObject.getKey(). Otherwise a KNXIllegalArgumentException will be thrown.
Note that on successful set the timestamp is renewed.

Parameters:
frame - the new CEMILData frame to set