net.jetrix
Class Message

java.lang.Object
  extended by net.jetrix.Message
Direct Known Subclasses:
AddPlayerMessage, ChannelMessage, DisconnectedMessage, NoConnectingMessage, NoopMessage, PlayerSwitchMessage, ShutdownMessage, SpectatorListMessage, WinlistMessage

public abstract class Message
extends Object

Internal message sent between server, channels and client handlers.

Version:
$Revision: 426 $, $Date: 2004-10-03 19:32:15 +0200 (dim., 03 oct. 2004) $
Author:
Emmanuel Bourg

Constructor Summary
Message()
          Constructs a new server message.
 
Method Summary
 Destination getDestination()
          Return the destination of this message.
 String getRawMessage(Protocol protocol, Locale locale)
          Return the view of this message in the specified protocol.
 Destination getSource()
          Return the source of this message.
 long getTime()
          Returns the creation date of this message.
 void setDestination(Destination destination)
          Set the destination of this message (optional).
 void setRawMessage(Protocol protocol, String message)
          Set the view of the message in the specified protocol.
 void setSource(Destination source)
          Set the source of this message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message()
Constructs a new server message.

Method Detail

getSource

public Destination getSource()
Return the source of this message. The source is a Destination accepting replies to this message.


setSource

public void setSource(Destination source)
Set the source of this message.


getDestination

public Destination getDestination()
Return the destination of this message. If the destination is null the default destination is the current channel of the user.


setDestination

public void setDestination(Destination destination)
Set the destination of this message (optional).


getTime

public long getTime()
Returns the creation date of this message.


setRawMessage

public void setRawMessage(Protocol protocol,
                          String message)
Set the view of the message in the specified protocol.


getRawMessage

public String getRawMessage(Protocol protocol,
                            Locale locale)
Return the view of this message in the specified protocol.



Copyright © 2001-2008 Emmanuel Bourg. All Rights Reserved.