message
Class ReplyMessage

java.lang.Object
  extended by message.Message
      extended by message.ReplyMessage
All Implemented Interfaces:
java.lang.Comparable<Message>, BasicMessage, ExternalMessage, Reply

public final class ReplyMessage
extends Message
implements Reply, ExternalMessage

ExternalMessage used to send data to a Client.

Author:
Karl-Peter Fuchs

Field Summary
static byte IDENTIFIER
          Identifier for this type of message.
 
Constructor Summary
ReplyMessage(byte[] byteMesssage, User user)
          Constructs a new ReplyMessage with the submitted content (byteMesssage) for the bypassed user/channel.
 
Method Summary
 int getMessageID()
          Returns the message id -2222 (all ReplyMessage s have the same id).
 java.lang.String toString()
          Returns a String representation of this class.
 
Methods inherited from class message.Message
compareTo, getByteMessage, getChannel, getChannelID, getNextMixChannelID, getTimeOfReceival, setByteMessage, setMessageID, setPayloadRange, setTimeOfReceival
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface message.BasicMessage
getByteMessage, getChannel, getChannelID, getNextMixChannelID, getTimeOfReceival, setByteMessage, setMessageID, setPayloadRange, setTimeOfReceival
 

Field Detail

IDENTIFIER

public static final byte IDENTIFIER
Identifier for this type of message. Necessary since messages are transmitted as byte streams which don't support the instanceOf operator.

See Also:
Constant Field Values
Constructor Detail

ReplyMessage

public ReplyMessage(byte[] byteMesssage,
                    User user)
Constructs a new ReplyMessage with the submitted content (byteMesssage) for the bypassed user/channel.

Parameters:
byteMesssage - Byte representation of this message.
user - User, this message belongs to.
Method Detail

getMessageID

public int getMessageID()
Returns the message id -2222 (all ReplyMessage s have the same id).

Specified by:
getMessageID in interface BasicMessage
Overrides:
getMessageID in class Message
Returns:
-2222.

toString

public java.lang.String toString()
Returns a String representation of this class.

Overrides:
toString in class java.lang.Object
Returns:
A String representation of this class.