Class NetMessage
java.lang.Object
QueueNet.NetMessage
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of NetMessage setting all the field to default values. -
Method Summary
Modifier and TypeMethodDescriptionclone()getData()Gets the data field of the NetMessage.Gets the Destination field of the NetMessage.byteGets the Destination Section field of the NetMessage.intgetEvent()Gets the event field of the NetMessage.getJob()Returns the job attached to message if the event is a JOB_EVENT or ACK_EVENT, otherwise returns null.Gets the Source field of the NetMessage.byteGets the Source Section field of the NetMessage.doublegetTime()Gets the time field of the NetMessage.booleanvoidSets the data field of the NetMessage.voidsetDestination(NetNode destination) Sets the destination field of the NetMessage.voidsetDestinationSection(byte destinationSection) Sets the Destination Section field of the NetMessage.voidsetEvent(int event) Sets the event field of the NetMessage.voidSets the source field of the NetMessage.voidsetSourceSection(byte sourceSection) Sets the Source Section field of the NetMessage.voidsetTime(double time) Sets the time field of the NetMessage.
-
Constructor Details
-
NetMessage
public NetMessage()Creates a new instance of NetMessage setting all the field to default values.
-
-
Method Details
-
setEvent
public void setEvent(int event) Sets the event field of the NetMessage.- Parameters:
event- Value of property event.
-
getEvent
public int getEvent()Gets the event field of the NetMessage.- Returns:
- Value of property event.
-
setSourceSection
public void setSourceSection(byte sourceSection) Sets the Source Section field of the NetMessage.- Parameters:
sourceSection- Value of property Source Section.
-
getSourceSection
public byte getSourceSection()Gets the Source Section field of the NetMessage.- Returns:
- Value of property Source Section.
-
setDestinationSection
public void setDestinationSection(byte destinationSection) Sets the Destination Section field of the NetMessage.- Parameters:
destinationSection- Value of property Destination Section.
-
getDestinationSection
public byte getDestinationSection()Gets the Destination Section field of the NetMessage.- Returns:
- Value of property Destination Section.
-
setData
Sets the data field of the NetMessage.- Parameters:
data- Value of property data.
-
getData
-
getJob
Returns the job attached to message if the event is a JOB_EVENT or ACK_EVENT, otherwise returns null.- Returns:
- The job of the NetMessage.
-
setTime
public void setTime(double time) Sets the time field of the NetMessage.- Parameters:
time- Value of property time.
-
getTime
public double getTime()Gets the time field of the NetMessage.- Returns:
- Value of property time.
-
setSource
Sets the source field of the NetMessage.- Parameters:
source- Value of property source.
-
getSource
Gets the Source field of the NetMessage.- Returns:
- Value of property Source.
-
setDestination
Sets the destination field of the NetMessage.- Parameters:
destination- Value of property destination .
-
getDestination
Gets the Destination field of the NetMessage.- Returns:
- Value of property Destination .
-
sentBy
-
clone
-