|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--net.sourceforge.jsrvany.test.ChatServerThread
This class is a single thread started by ChatServer
Copyright (c) 1999 Damian Fauth
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
ChatServerThread(java.net.Socket sock,
Bus bus)
Constructor assigning socket |
Method Summary | |
void |
communicate()
implement the comms |
java.lang.String |
getHandle()
get the handle of this listener |
java.util.Date |
getLastWriteDate()
get the date-time of last write |
java.util.Date |
getRegisterDate()
get the date-time of registration |
void |
notify(java.lang.String data)
the bus has notified the listener of new bus data |
void |
run()
run this thread |
protected void |
stopRunning()
signal thread to stop running |
protected void |
write(java.lang.String message)
write to the client |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ChatServerThread(java.net.Socket sock, Bus bus)
sock
- is the Socket objectMethod Detail |
public void run()
public void communicate() throws java.io.IOException
public void notify(java.lang.String data)
data
- is the data as a Stringpublic java.lang.String getHandle()
protected void write(java.lang.String message) throws java.io.IOException
message
- is the message to send as a Stringprotected void stopRunning() throws java.io.IOException
public java.util.Date getRegisterDate()
public java.util.Date getLastWriteDate()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |