public class ClientListenerManager
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
void |
addCommandListener(CommandListener listener) |
Adds the specified
CommandListener to the list |
void |
addMessageListener(MessageListener listener) |
Adds the specified
MessageListener to the list |
void |
raiseCommandEvent(Command command) |
Runs each of the
CommandListeners with the command as input |
void |
raiseMessageEvent(Message message) |
Runs each of the
MessageListeners with the message as input |
void |
removeAllListeners() |
Removes every single listener registered to the server
|
void |
removeCommandListener(CommandListener listener) |
Removes the specified
CommandListener from the list |
void |
removeMessageListener(MessageListener listener) |
Removes the specified
MessageListener from the list |
public void addMessageListener(MessageListener listener)
MessageListener to the listlistener - the listener to be addedpublic void removeMessageListener(MessageListener listener)
MessageListener from the listlistener - the listener to be removedpublic void addCommandListener(CommandListener listener)
CommandListener to the listlistener - the listener to be addedpublic void removeCommandListener(CommandListener listener)
CommandListener from the listlistener - the listener to be removedpublic void removeAllListeners()
public void raiseMessageEvent(Message message)
MessageListeners with the message as inputmessage - the Message to pass to each of the listenerspublic void raiseCommandEvent(Command command)
CommandListeners with the command as inputcommand - the Command to pass to each of the listeners