|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.di.mg4j.index.remote.ServerThread
public abstract class ServerThread
A abstract class representing a thread that provides services inside an index server.
Implementing subclasses must just implement the Runnable.run() method,
using the predefined socket input stream and socket output stream.
| Field Summary | |
|---|---|
protected DataInputStream |
inputStream
The input stream of socket, buffered and wrapped inside a data input stream. |
protected DataOutputStream |
outputStream
The output stream of socket, buffered and wrapped inside a data output stream. |
protected Socket |
socket
The socket associated with this server thread. |
| Constructor Summary | |
|---|---|
ServerThread(Socket socket)
Creates a new server thread. |
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Field Detail |
|---|
protected final Socket socket
protected final DataInputStream inputStream
socket, buffered and wrapped inside a data input stream.
protected final DataOutputStream outputStream
socket, buffered and wrapped inside a data output stream.
| Constructor Detail |
|---|
public ServerThread(Socket socket)
throws IOException
socket - a socket in listening mode that handles client connections.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||