soc.message
Interface SOCKeyedMessage

All Known Implementing Classes:
SOCSVPTextMessage

public interface SOCKeyedMessage

This indicates that a SOCMessage type contains a keyed text field which needs to be localized while sending to clients. This is different from SOCGameTextMsg because this message type also contains non-text data fields.

Since:
2.0.00
Author:
Jeremy D Monin <jeremy@nand.net>

Method Summary
 java.lang.String getKey()
          Get the message localization key, from StringManager.get(String), to look up and send the text of as part of this message.
 java.lang.String toCmd(java.lang.String localizedText)
          Construct a message ready to be sent, like SOCMessage.toCmd(), with text localized by the server.
 

Method Detail

getKey

java.lang.String getKey()
Get the message localization key, from StringManager.get(String), to look up and send the text of as part of this message.

Returns:
The text key to be localized from the message's key field, or (rarely) null

toCmd

java.lang.String toCmd(java.lang.String localizedText)
Construct a message ready to be sent, like SOCMessage.toCmd(), with text localized by the server.

Parameters:
localizedText - Text field contents localized by the server, from getKey() and the client's locale, or null if getKey() == null
Returns:
A message formatted like SOCMessage.toCmd()