org.sapia.ubik.net
Interface Connection

All Known Subinterfaces:
RmiConnection
All Known Implementing Classes:
HttpRmiClientConnection, JdkRmiClientConnection, NioTcpRmiClientConnection, NioTcpRmiServerConnection, ServletRmiConnection, SocketConnection, SocketRmiConnection, UDPConnection, UdpRmiConnection

public interface Connection

Specifies "connection" behavior: in this case, connections that send and receive objects over the wire.

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

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.
 

Method Detail

send

void send(java.lang.Object o)
          throws java.io.IOException,
                 java.rmi.RemoteException
Sends the given object to the server with which this connection communicates.

Parameters:
an - Object.
Throws:
java.io.IOException
java.rmi.RemoteException

receive

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

Returns:
an Object.
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.rmi.RemoteException

close

void close()
Closes this connection.


getServerAddress

ServerAddress getServerAddress()
Returns "address" of the server with which this connection communicates.

Returns:
a ServerAddress.


Copyright © 2010 Sapia OSS. All Rights Reserved.