|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.pdx.cs399J.net.ChatListener
public class ChatListener
A ChatListener runs in the background and listens for
messages on a socket on localhost.
| Constructor Summary | |
|---|---|
ChatListener()
Creates a new ChatListener |
|
| Method Summary | |
|---|---|
List |
getMessages()
Returns all incoming messages. |
void |
run()
Sit in a loop and wait for messages to come in. |
void |
setSocket(Socket socket)
Sets the socket on which this ChatListener listens |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChatListener()
ChatListener
| Method Detail |
|---|
public void setSocket(Socket socket)
ChatListener listens
public void run()
ObjectInputStream
blocks. So, we have to encode a "STOP" command in the final
message. Awful.
run in interface Runnablepublic List getMessages()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||