|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.di.mg4j.index.remote.RemoteIndexServerConnection
public class RemoteIndexServerConnection
An index server connection.
Instances of this class provide a convenient way to gather all fields related to a server connection (streams, socket, etc.).
| Field Summary | |
|---|---|
DataInputStream |
inputStream
The stream from the server. |
DataOutputStream |
outputStream
The stream towards the server. |
Socket |
socket
|
| Constructor Summary | |
|---|---|
RemoteIndexServerConnection(SocketAddress address,
byte command)
Creates a remote index-server connection from a given address and command. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the underlying socket. |
protected void |
finalize()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final Socket socket
public final DataInputStream inputStream
public final DataOutputStream outputStream
| Constructor Detail |
|---|
public RemoteIndexServerConnection(SocketAddress address,
byte command)
throws IOException
Immediately after establishing the connection, command is sent
to the server, so the stream will be connected to a thread providing a specific service. See IndexServer.
address - the server address.command - the first command sent to the server (IndexServer.GET_CLIENT_INPUT_STREAM,
IndexServer.GET_INDEX_READER, …).
IOException| Method Detail |
|---|
public void close()
throws IOException
close in interface CloseableIOException
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||