net.jetrix.protocols
Class IRCProtocol
java.lang.Object
net.jetrix.protocols.AbstractProtocol
net.jetrix.protocols.IRCProtocol
- All Implemented Interfaces:
- Protocol
public class IRCProtocol
- extends AbstractProtocol
Protocol to communicate with IRC clients.
- Version:
- $Revision: 799 $, $Date: 2009-02-18 17:28:08 +0100 (Wed, 18 Feb 2009) $
- Author:
- Emmanuel Bourg
|
Method Summary |
String |
applyStyle(String text)
Transform the style tags (<blue>, <u>,
etc...) contained in the specified string into the style codes of this
protocol. |
char |
getEOL()
Return the end of line character used by this protocol. |
Message |
getMessage(String line)
Parse the specified string and return the corresponding server
message for this protocol. |
String |
getName()
Return the name of this protocol |
Map<String,String> |
getStyles()
|
String |
translate(AddLineMessage m)
|
String |
translate(BlockBombMessage m)
|
String |
translate(BlockQuakeMessage m)
|
String |
translate(ClearLineMessage m)
|
String |
translate(ClearSpecialsMessage m)
|
String |
translate(CommandMessage m)
|
String |
translate(DisconnectedMessage m)
|
String |
translate(EndGameMessage m,
Locale locale)
|
String |
translate(FieldMessage m)
|
String |
translate(GmsgMessage m,
Locale locale)
|
String |
translate(GravityMessage m)
|
String |
translate(IngameMessage m,
Locale locale)
|
String |
translate(JoinMessage m,
Locale locale)
|
String |
translate(LeaveMessage m,
Locale locale)
|
String |
translate(LevelMessage m)
|
String |
translate(LinesAddedMessage m)
|
String |
translate(Message m,
Locale locale)
Translate the specified message into a string that will be sent
to a client using this protocol. |
String |
translate(NewGameMessage m,
Locale locale)
|
String |
translate(NukeFieldMessage m)
|
String |
translate(PauseMessage m)
|
String |
translate(PlayerLostMessage m)
|
String |
translate(PlineActMessage m,
Locale locale)
|
String |
translate(PlineMessage m,
Locale locale)
|
String |
translate(RandomClearMessage m)
|
String |
translate(ResumeMessage m)
|
String |
translate(SpectatorListMessage m,
Locale locale)
|
String |
translate(SwitchFieldsMessage m)
|
String |
translate(TeamMessage m,
Locale locale)
|
IRCProtocol
public IRCProtocol()
getName
public String getName()
- Return the name of this protocol
- Returns:
- the name of this protocol
getMessage
public Message getMessage(String line)
- Parse the specified string and return the corresponding server
message for this protocol.
- Parameters:
line - the client message to parse
- Returns:
- the
Message equivalent of the specified
String or null if the protocol cannot understand the message.
translate
public String translate(Message m,
Locale locale)
- Translate the specified message into a string that will be sent
to a client using this protocol.
- Parameters:
m - the message to translatelocale - the locale used for internationalized text messages
- Returns:
- the String equivalent in this protocol for the specified
Message or null if it can't be translated.
translate
public String translate(PlineMessage m,
Locale locale)
translate
public String translate(PlineActMessage m,
Locale locale)
translate
public String translate(GmsgMessage m,
Locale locale)
translate
public String translate(SpectatorListMessage m,
Locale locale)
translate
public String translate(TeamMessage m,
Locale locale)
translate
public String translate(JoinMessage m,
Locale locale)
translate
public String translate(LeaveMessage m,
Locale locale)
translate
public String translate(NewGameMessage m,
Locale locale)
translate
public String translate(EndGameMessage m,
Locale locale)
translate
public String translate(IngameMessage m,
Locale locale)
translate
public String translate(PauseMessage m)
translate
public String translate(ResumeMessage m)
translate
public String translate(LevelMessage m)
translate
public String translate(FieldMessage m)
translate
public String translate(PlayerLostMessage m)
translate
public String translate(DisconnectedMessage m)
translate
public String translate(CommandMessage m)
translate
public String translate(LinesAddedMessage m)
translate
public String translate(AddLineMessage m)
translate
public String translate(ClearLineMessage m)
translate
public String translate(NukeFieldMessage m)
translate
public String translate(RandomClearMessage m)
translate
public String translate(SwitchFieldsMessage m)
translate
public String translate(ClearSpecialsMessage m)
translate
public String translate(GravityMessage m)
translate
public String translate(BlockQuakeMessage m)
translate
public String translate(BlockBombMessage m)
getStyles
public Map<String,String> getStyles()
applyStyle
public String applyStyle(String text)
- Description copied from interface:
Protocol
- Transform the style tags (<blue>, <u>,
etc...) contained in the specified string into the style codes of this
protocol.
- Parameters:
text - the string to transform
- Returns:
- the stylized representation of the specified string for
this protocol.
getEOL
public char getEOL()
- Description copied from interface:
Protocol
- Return the end of line character used by this protocol.
Copyright © 2001-2010. All Rights Reserved.