|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openbandy.io.Message
public final class Message
TODO describe purpose and usage
(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.
Constructor Summary | |
---|---|
Message()
The default constructor set NO_SENDER and
UNDEFINED_TYPE . |
|
Message(java.lang.String sender)
|
Method Summary | |
---|---|
void |
deserialize(Serializer serializer,
SerializationBuffer buffer)
This method must overwrite the attributes denoted in getAttributeNames() with values read from the container provided. |
void |
getAttributeNames(java.util.Vector attributes)
This method must put the name of every attribute that needs to be serialized in the given Vector. |
Serializable |
getContent()
|
Serializable |
getCopy()
Must return a copy of the object that is equal according to the method isEuqalTo(). |
java.lang.String |
getIdName()
Must return the name of the id (e.g. |
int |
getIdValue()
Must return the value of the id. |
java.lang.String |
getLegibleString()
Must return a human readable String representation of the object. |
Serializable |
getNewInstance()
Must return a new and initialized instance. |
void |
getReferencedIdNames(java.util.Vector referenceNames)
This method must put every id name of referenced objects, i.e. |
void |
getReferences(java.util.Vector references)
This method must put every reference to Serializable objects, i.e. |
java.lang.String |
getSender()
|
int |
getType()
|
boolean |
isEqual(Serializable serializableObject)
Must return true if the serializableObject is equal to this, except for the id but INCLUDING equality of referenced serializables. |
boolean |
isEqualShallow(Serializable serializableObject)
Must return true if the serializableObject is equal to this, except for the id, EXCLUDING equality of referenced serializables. |
void |
prepare(Serializer serializer,
SerializationBuffer buffer)
|
void |
serialize(Serializer serializer,
SerializationBuffer buffer)
This method must fill the container provided with the serialization- Object with values for every attribute denoted in getAttributeNames(). |
void |
setContent(Serializable content)
TODO comment! |
void |
setIdValue(int idValue)
Set the id to the given value. |
void |
setSender(java.lang.String sender)
TODO comment! |
void |
setType(int type)
TODO comment! |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Message()
NO_SENDER
and
UNDEFINED_TYPE
.
public Message(java.lang.String sender)
Method Detail |
---|
public Serializable getContent()
public java.lang.String getSender()
public int getType()
public void setType(int type)
type
- An arbitrary String describing the type of the message.public void setContent(Serializable content)
content
- public void setSender(java.lang.String sender)
sender
- public void prepare(Serializer serializer, SerializationBuffer buffer)
public void serialize(Serializer serializer, SerializationBuffer buffer)
Serializable
serialize
in interface Serializable
serializer
- -
the serializer used for call-backsbuffer
- -
the serializationBuffer containing the container to write
values topublic void deserialize(Serializer serializer, SerializationBuffer buffer)
Serializable
deserialize
in interface Serializable
serializer
- -
the serializer used for call-backsbuffer
- -
the buffer to read values frompublic java.lang.String getLegibleString()
Serializable
getLegibleString
in interface Serializable
public boolean isEqualShallow(Serializable serializableObject) throws java.lang.ClassCastException
Serializable
isEqualShallow
in interface Serializable
serializableObject
- -
the object to compare
java.lang.ClassCastException
public boolean isEqual(Serializable serializableObject) throws java.lang.ClassCastException
Serializable
isEqual
in interface Serializable
serializableObject
- -
the object to compare
java.lang.ClassCastException
public Serializable getNewInstance()
Serializable
getNewInstance
in interface Serializable
public Serializable getCopy()
Serializable
getCopy
in interface Serializable
public void getAttributeNames(java.util.Vector attributes)
Serializable
attributes
, there must be a corresponding field in the
database for example.
getAttributeNames
in interface Serializable
attributes
- -
the vector to be filledpublic void getReferences(java.util.Vector references)
Serializable
getReferences
in interface Serializable
references
- -
the vector to be filledpublic void getReferencedIdNames(java.util.Vector referenceNames)
Serializable
getReferencedIdNames
in interface Serializable
referenceNames
- -
the vector to be filledpublic java.lang.String getIdName()
Serializable
getIdName
in interface Serializable
public int getIdValue()
Serializable
getIdValue
in interface Serializable
public void setIdValue(int idValue)
Serializable
setIdValue
in interface Serializable
idValue
- -
the new id valuepublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |