|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
lezione2.multithread.server.ServerThread
public class ServerThread
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private static int |
counter
Contatore dei thread server avviati. |
private int |
id
ID del thread corrente. |
private java.io.BufferedReader |
in
BufferedReader creato dal Socket. |
private java.io.PrintWriter |
out
PrintWriter creato dal Socket. |
private java.net.Socket |
socket
Socket usato dal Thread. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ServerThread(java.net.Socket s)
Costruttore del Thread. |
Method Summary | |
---|---|
void |
run()
Attività del Thread. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static int counter
private int id
private java.net.Socket socket
private java.io.BufferedReader in
private java.io.PrintWriter out
Constructor Detail |
---|
public ServerThread(java.net.Socket s) throws java.io.IOException
s
- la connessione con il client
java.io.IOException
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |