net.jetrix.messages
Class TextMessage

java.lang.Object
  extended by net.jetrix.Message
      extended by net.jetrix.messages.ChannelMessage
          extended by net.jetrix.messages.TextMessage
Direct Known Subclasses:
GmsgMessage, PlineActMessage, PlineMessage, SmsgMessage

public abstract class TextMessage
extends ChannelMessage

A generic internationalized text message.

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

Constructor Summary
TextMessage()
           
 
Method Summary
 String getKey()
          Return the key of the message.
 String getRawMessage(Protocol protocol, Locale locale)
          Return the view of this message in the specified protocol.
 String getText()
          Return the text of this message using the default server locale.
 String getText(Locale locale)
          Return the text of this message using the specified locale.
 void setKey(String key, Object... params)
          Set the key and the parameters of the message for internationalized text messages.
 void setText(String text)
          Set the text of the message (locale independant).
 
Methods inherited from class net.jetrix.messages.ChannelMessage
getChannel, getSlot, setChannel, setSlot
 
Methods inherited from class net.jetrix.Message
getDestination, getSource, getTime, setDestination, setRawMessage, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextMessage

public TextMessage()
Method Detail

getText

public String getText()
Return the text of this message using the default server locale.


getText

public String getText(Locale locale)
Return the text of this message using the specified locale.


setText

public void setText(String text)
Set the text of the message (locale independant).


getKey

public String getKey()
Return the key of the message.


setKey

public void setKey(String key,
                   Object... params)
Set the key and the parameters of the message for internationalized text messages.


getRawMessage

public String getRawMessage(Protocol protocol,
                            Locale locale)
Description copied from class: Message
Return the view of this message in the specified protocol.

Overrides:
getRawMessage in class Message


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