| |
|
| java.lang.Object org.apache.harmony.rmi.server.ServerConnection
All known Subclasses: org.apache.harmony.rmi.transport.tcp.TcpServerConnection, org.apache.harmony.rmi.transport.proxy.HttpServerConnection,
ServerConnection | abstract public class ServerConnection implements RMIProtocolConstants,Runnable(Code) | | Connection opened on server side when connection from the client is accepted.
It acknowledges RMI protocol version, RMI protocol type etc. and after that
pass the control to the appropriate UnicastServerRef for processing the
remote call itself.
author: Mikhail A. Markov version: $Revision: 1.1.2.3 $ |
Method Summary | |
abstract protected int | clientProtocolAck() Acknowledges protocol with client side. | public void | close() Closes this connection. | protected void | dgcUnregisterUID(UID uid) This method should be called when DGC_ACK response was received. | public InputStream | getInputStream() Returns open input stream. | public OutputStream | getOutputStream() Returns open output stream. | public boolean | hasActiveCall() Returns true if this connection is handling remote call and false
otherwise. | public void | releaseInputStream() By default does nothing. | public void | releaseOutputStream() By default does nothing. | public void | run() Acknowledges RMI protocol version, RMI protocol type etc. | public String | toString() Returns string representation of this connection. | abstract protected int | waitCallMsg() Waiting until 0x50 code (CALL_MSG) message will be received (this code
will be returned as a result of this method call). |
ep | protected Endpoint ep(Code) | | Endpoint which this connection connected to.
|
ServerConnection | public ServerConnection(Socket s, ServerConnectionManager mgr) throws IOException(Code) | | Constructs ServerConnection working through socket specified.
Parameters: s - Socket connected to the client Parameters: mgr - ServerConnectionManager managing this connection throws: IOException - if an I/O error occurred during gettinginput/output streams from specified socket |
clientProtocolAck | abstract protected int clientProtocolAck() throws IOException(Code) | | Acknowledges protocol with client side.
acknowledged protocol number throws: RemoteException - if any I/O exception occurred during protocolacknowledgement |
close | public void close()(Code) | | Closes this connection.
|
dgcUnregisterUID | protected void dgcUnregisterUID(UID uid)(Code) | | This method should be called when DGC_ACK response was received.
It unregisters the given UID in ClientDGC.
Parameters: uid - UID DGC_ACK response for which was read |
getInputStream | public InputStream getInputStream()(Code) | | Returns open input stream.
open input stream |
getOutputStream | public OutputStream getOutputStream()(Code) | | Returns open output stream.
open output stream |
hasActiveCall | public boolean hasActiveCall()(Code) | | Returns true if this connection is handling remote call and false
otherwise.
true if this connection is handling remote call and falseotherwise |
releaseInputStream | public void releaseInputStream() throws IOException(Code) | | By default does nothing.
|
releaseOutputStream | public void releaseOutputStream() throws IOException(Code) | | By default does nothing.
|
run | public void run()(Code) | | Acknowledges RMI protocol version, RMI protocol type etc. and wait for
remote calls from client. After call message dispatch call to appropriate
UnicastServerRef for processing.
|
toString | public String toString()(Code) | | Returns string representation of this connection.
string representation of this connection |
waitCallMsg | abstract protected int waitCallMsg() throws IOException(Code) | | Waiting until 0x50 code (CALL_MSG) message will be received (this code
will be returned as a result of this method call). If the
connection with the client is closed while waiting for this code, -1
should be returned.
0x50 code if this code is received from the client or -1 ifthe socket was closed while waiting for CALL_MSG code throws: IOException - if any I/O error occurred while communicating withclient |
|
|
|