KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > net > Connection


1 package org.sapia.ubik.net;
2
3 import java.io.*;
4
5 import java.rmi.RemoteException JavaDoc;
6
7
8 /**
9  * Specifies "connection" behavior: in this case, connections that send and
10  * receive objects over the wire.
11  *
12  * @author Yanick Duchesne
13  * <dl>
14  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
15  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
16  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
17  * </dl>
18  */

19 public interface Connection {
20   /**
21    * Sends the given object to the server with which this connection
22    * communicates.
23    *
24    * @param an <code>Object</code>.
25    */

26   public void send(Object JavaDoc o) throws IOException, RemoteException JavaDoc;
27
28   /**
29    * Receives an object from the server with which this connection
30    * communicates.
31    *
32    * @return an <code>Object</code>.
33    */

34   public Object JavaDoc receive()
35     throws IOException, ClassNotFoundException JavaDoc, RemoteException JavaDoc;
36
37   /**
38    * Closes this connection.
39    */

40   public void close();
41
42   /**
43    * Returns "address" of the server with which this connection
44    * communicates.
45    *
46    * @return a <code>ServerAddress</code>.
47    */

48   public ServerAddress getServerAddress();
49 }
50
Popular Tags