KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > rmi > server > transport > TransportProvider


1 package org.sapia.ubik.rmi.server.transport;
2
3 import java.rmi.RemoteException JavaDoc;
4 import java.util.Properties JavaDoc;
5
6 import org.sapia.ubik.net.ServerAddress;
7 import org.sapia.ubik.rmi.server.Server;
8
9
10 /**
11  * This interface abstracts the transport layer's implementation.
12  *
13  * @author Yanick Duchesne
14  * <dl>
15  * <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>
16  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
17  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
18  * </dl>
19  */

20 public interface TransportProvider {
21   /**
22    * Returns a client connection pool to the given server address.
23    *
24    * @param address a <code>ServerAddress</code>.
25    * @return a <code>Connection</code>.
26    * @throws RemoteException if a problem occurs creating the connection.
27    */

28   public Connections getPoolFor(ServerAddress address)
29     throws RemoteException JavaDoc;
30
31   /**
32    * Releases the given client connection.
33    *
34    * @param a <code>Connection</code>.
35    * @throws RemoteException if a problem occurs releasing the given connection.
36    */

37
38   //public void release(Connection conn) throws RemoteException;
39

40   /**
41    * Returns a server implementation.
42    *
43    * @param props the <code>Properties</code> used to create the server.
44    * @return a <code>Server</code> instance.
45    */

46   public Server newServer(Properties JavaDoc props) throws RemoteException JavaDoc;
47
48   /**
49    * This method is called by Ubik RMI's runtime when a server is needed on
50    * the client side to recieve asynchronous responses (i.e.: callbacks). Implementations
51    * must in this case provide a "default" <code>Server</code> instance.
52    *
53    * @return a <code>Server</code>.
54    */

55   public Server newDefaultServer() throws RemoteException JavaDoc;
56
57   /**
58    * Returns this instance's "transport type".
59    *
60    * @return a transport type.
61    */

62   public String JavaDoc getTransportType();
63
64   /**
65    * Shuts down this provider.
66    */

67   public void shutdown();
68 }
69
Popular Tags