org.keridwen.core.data.storage.packet
Class ObjectAccessorUnsafe<ObjectType>

java.lang.Object
  extended by org.keridwen.core.data.storage.packet.ObjectAccessorUnsafe<ObjectType>
All Implemented Interfaces:
Accessor<ObjectType>, AccessorUnsafe<ObjectType>

public class ObjectAccessorUnsafe<ObjectType>
extends Object
implements AccessorUnsafe<ObjectType>

Author:
JeT - Artenum, Benoit Thiebault - Artenum

Constructor Summary
ObjectAccessorUnsafe(Class<? extends ObjectType> objectClass)
          Constructor using a null object
 
Method Summary
 ObjectType getContent()
           
 Class<?>[] getDataTypes()
          get the list of data types this accessor can manage
 AccessorId getId()
          Get the Id
 AccessorMode getMode()
          tell if the accessor is safe or not
 void readUnsafe(DataPacketUnsafe<ObjectType> packet)
          read data from a DataPacket in unsafe mode
 void setObject(ObjectType object)
           
 void unsafeWrite(DataPacketUnsafe<ObjectType> packet)
          write data to the DataPacket in unsafe mode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectAccessorUnsafe

public ObjectAccessorUnsafe(Class<? extends ObjectType> objectClass)
Constructor using a null object

Parameters:
objectClass - class o the null object
Method Detail

getId

public AccessorId getId()
Description copied from interface: Accessor
Get the Id

Specified by:
getId in interface Accessor<ObjectType>
See Also:
Accessor.getId()

getDataTypes

public Class<?>[] getDataTypes()
Description copied from interface: Accessor
get the list of data types this accessor can manage

Specified by:
getDataTypes in interface Accessor<ObjectType>
See Also:
Accessor.getDataTypes()

getContent

public ObjectType getContent()
Specified by:
getContent in interface AccessorUnsafe<ObjectType>
Returns:
the object

setObject

public void setObject(ObjectType object)
Specified by:
setObject in interface AccessorUnsafe<ObjectType>
Parameters:
object - the object to set

readUnsafe

public void readUnsafe(DataPacketUnsafe<ObjectType> packet)
Description copied from interface: AccessorUnsafe
read data from a DataPacket in unsafe mode

Specified by:
readUnsafe in interface AccessorUnsafe<ObjectType>
See Also:
org.keridwen.core.data.storage.packet.Accessor#readUnsafe(org.keridwen.core.data.storage.packet.DataPacketUnsafe)

unsafeWrite

public void unsafeWrite(DataPacketUnsafe<ObjectType> packet)
Description copied from interface: AccessorUnsafe
write data to the DataPacket in unsafe mode

Specified by:
unsafeWrite in interface AccessorUnsafe<ObjectType>
See Also:
org.keridwen.core.data.storage.packet.Accessor#unsafeWrite(org.keridwen.core.data.storage.packet.DataPacketUnsafe)

getMode

public AccessorMode getMode()
Description copied from interface: Accessor
tell if the accessor is safe or not

Specified by:
getMode in interface Accessor<ObjectType>
See Also:
org.keridwen.core.data.storage.packet.Accessor#isSafe()


Copyright © 2010-2013 Artenum. All Rights Reserved.