vooga.social.chat
Class ChatController
java.lang.Object
vooga.social.chat.ChatController
- All Implemented Interfaces:
- IVoogaChatReceiver
public class ChatController
- extends java.lang.Object
- implements IVoogaChatReceiver
Controller for the chat and friend panes. Instantiates everything and handles
all the server-talking, pretty much
- Author:
- Alex Kritchevsky
Method Summary |
void |
receiveMessage(long channelID,
java.lang.String senderName,
java.lang.String message)
receives a message and delegates it as appropriate to the social
sections. |
void |
setUser(java.lang.String userName)
sets the user of the chat to a new one, in case someone new logged in. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChatController
public ChatController(IVoogaGUI gui)
setUser
public void setUser(java.lang.String userName)
- sets the user of the chat to a new one, in case someone new logged in.
Creates a client if there isn't one, breaks if the chat hasn't been
initiated, connects the client if it's not, and disconnects if the user
is null. possible states:
- Parameters:
userName
-
receiveMessage
public void receiveMessage(long channelID,
java.lang.String senderName,
java.lang.String message)
- receives a message and delegates it as appropriate to the social
sections.
- Specified by:
receiveMessage
in interface IVoogaChatReceiver
- Parameters:
channelID
- - The channel that the message originated from.senderName
- - The user that sent the message.