message
Class ReplyMessage
java.lang.Object
message.Message
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
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.
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.