|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.pdx.cs399J.net.ChatCommunicator
public class ChatCommunicator
A ChatCommunicator obtains a Socket and
then creates a ChatSpeaker and a
ChatListener that run in their own threads.
| Constructor Summary | |
|---|---|
ChatCommunicator(int port)
Creates a new ChatCommunicator on a given port. |
|
| Method Summary | |
|---|---|
List |
getMessages()
Gets messages from the ChatListener |
void |
run()
Make the connection to the socket. |
void |
sendMessage(ChatMessage message)
Delegates to the ChatSpeaker |
void |
startup()
Starts up this ChatCommunicator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChatCommunicator(int port)
ChatCommunicator on a given port.
| Method Detail |
|---|
public void startup()
ChatCommunicator.
public void run()
Socket, is starts a SocketServer and
waits for a connection. Then, start the speaker and listener.
run in interface Runnablepublic void sendMessage(ChatMessage message)
ChatSpeaker
public List getMessages()
ChatListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||