org.lucci.madhoc.messaging
Class Message

java.lang.Object
  extended by org.lucci.madhoc.messaging.TransferableObject
      extended by org.lucci.madhoc.messaging.Message
All Implemented Interfaces:
java.lang.Cloneable, MemoryConsumingObject

public class Message
extends TransferableObject


Field Summary
static int APPLICATION_MESSAGE
           
static int DELIVERY_FAILURE
           
 
Constructor Summary
Message()
           
 
Method Summary
 void addNumberOfBytesDeliveredTo(Station recipient, int amount)
           
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
           
 java.util.Collection<Station> findRecipientStations()
           
 TransferableObject getContent()
           
 int getIdentifier()
           
 MessageInformation getMessageInformation()
           
 int getNumberOfBytesDeliveredTo(Station recipient)
           
 int getNumberOfCollisions()
           
 java.util.Collection<Application> getRecipientApplications()
           
 int getSizeInBytes()
           
 Application getSourceStationApplication()
           
 int getType()
           
 boolean isMulticast()
           
 boolean isUnicast()
           
 void setContent(TransferableObject object)
           
 void setMessageInformation(MessageInformation transferInformation)
           
 void setNumberOfCollisions(int numberOfCollisions)
           
 void setSourceStationApplication(Application sourceStationApplication)
           
 void setType(int type)
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION_MESSAGE

public static final int APPLICATION_MESSAGE
See Also:
Constant Field Values

DELIVERY_FAILURE

public static final int DELIVERY_FAILURE
See Also:
Constant Field Values
Constructor Detail

Message

public Message()
Method Detail

getNumberOfCollisions

public int getNumberOfCollisions()

setNumberOfCollisions

public void setNumberOfCollisions(int numberOfCollisions)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getSizeInBytes

public int getSizeInBytes()

clone

public java.lang.Object clone()
Overrides:
clone in class TransferableObject

isUnicast

public boolean isUnicast()

isMulticast

public boolean isMulticast()

getContent

public TransferableObject getContent()

setContent

public void setContent(TransferableObject object)

getSourceStationApplication

public Application getSourceStationApplication()

getMessageInformation

public MessageInformation getMessageInformation()

setMessageInformation

public void setMessageInformation(MessageInformation transferInformation)

getRecipientApplications

public java.util.Collection<Application> getRecipientApplications()

setSourceStationApplication

public void setSourceStationApplication(Application sourceStationApplication)

findRecipientStations

public java.util.Collection<Station> findRecipientStations()

getNumberOfBytesDeliveredTo

public int getNumberOfBytesDeliveredTo(Station recipient)

addNumberOfBytesDeliveredTo

public void addNumberOfBytesDeliveredTo(Station recipient,
                                        int amount)

getType

public int getType()

setType

public void setType(int type)

getIdentifier

public int getIdentifier()