org.sapia.ubik.rmi.server.transport.nio.tcp
Class NioTcpRmiClientConnection

java.lang.Object
  extended by org.sapia.ubik.rmi.server.transport.nio.tcp.NioTcpRmiClientConnection
All Implemented Interfaces:
Connection, RmiConnection

public class NioTcpRmiClientConnection
extends java.lang.Object
implements RmiConnection

A connection over a Socket- the connection uses the MarshalOutputStream class to serialize outgoing objects.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software . All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Constructor Summary
NioTcpRmiClientConnection(java.net.Socket sock, int bufsize)
          Constructor for RMIConnection.
 
Method Summary
 void close()
          Closes this connection.
 ServerAddress getServerAddress()
          Returns "address" of the server with which this connection communicates.
 java.lang.Object receive()
          Receives an object from the server with which this connection communicates.
 void send(java.lang.Object o)
          Sends the given object to the server with which this connection communicates.
 void send(java.lang.Object o, VmId vmId, java.lang.String transportType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NioTcpRmiClientConnection

public NioTcpRmiClientConnection(java.net.Socket sock,
                                 int bufsize)
                          throws java.io.IOException
Constructor for RMIConnection.

Parameters:
sock -
Throws:
java.io.IOException
Method Detail

getServerAddress

public ServerAddress getServerAddress()
Description copied from interface: Connection
Returns "address" of the server with which this connection communicates.

Specified by:
getServerAddress in interface Connection
Returns:
a ServerAddress.
See Also:
Connection.getServerAddress()

send

public void send(java.lang.Object o,
                 VmId vmId,
                 java.lang.String transportType)
          throws java.io.IOException,
                 java.rmi.RemoteException
Specified by:
send in interface RmiConnection
Throws:
java.io.IOException
java.rmi.RemoteException
See Also:
RmiConnection.send(Object, VmId, String)

send

public void send(java.lang.Object o)
          throws java.io.IOException,
                 java.rmi.RemoteException
Description copied from interface: Connection
Sends the given object to the server with which this connection communicates.

Specified by:
send in interface Connection
Throws:
java.io.IOException
java.rmi.RemoteException
See Also:
Connection.send(java.lang.Object)

receive

public java.lang.Object receive()
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException,
                                java.rmi.RemoteException
Description copied from interface: Connection
Receives an object from the server with which this connection communicates.

Specified by:
receive in interface Connection
Returns:
an Object.
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.rmi.RemoteException
See Also:
Connection.receive()

close

public void close()
Description copied from interface: Connection
Closes this connection.

Specified by:
close in interface Connection
See Also:
Connection.close()


Copyright © 2010 Sapia OSS. All Rights Reserved.