org.sapia.ubik.rmi.server.transport
Class TransportManager

java.lang.Object
  extended by org.sapia.ubik.rmi.server.transport.TransportManager

public class TransportManager
extends java.lang.Object

The transport manager is the single-entry point into Ubik RMI's transport layer. It allows to register TransportProvider instances, which provide transport implementations on top of different network protocols.

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
TransportManager()
           
 
Method Summary
static Connections getConnectionsFor(ServerAddress address)
          Gets a connection pool that holds connections to a server, given the server's address.
static SocketTransportProvider getDefaultProvider()
          Returns the default transport provider.
static TransportProvider getProviderFor(java.lang.String type)
          Returns the transport provider corresponding to the given type.
static void registerProvider(TransportProvider provider)
          Registers the transport provider of the given type with the transport manager.
static void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportManager

public TransportManager()
Method Detail

registerProvider

public static void registerProvider(TransportProvider provider)
Registers the transport provider of the given type with the transport manager. The provider is internally mapped to its "transport type".

Parameters:
provider - a TransportProvider instance.
Throws:
java.lang.IllegalArgumentException - if a provider is already registered for the given type.
See Also:
TransportProvider.getTransportType()

getProviderFor

public static TransportProvider getProviderFor(java.lang.String type)
Returns the transport provider corresponding to the given type.

Parameters:
type - the logical type of the desired transport provider.
Returns:
a TransportProvider.
Throws:
java.lang.IllegalArgumentException - if no provider is registered for the passed in type.

getConnectionsFor

public static Connections getConnectionsFor(ServerAddress address)
                                     throws java.rmi.RemoteException
Gets a connection pool that holds connections to a server, given the server's address.

Parameters:
address - a ServerAddress.
Returns:
a ConnectionPool.
Throws:
java.rmi.RemoteException - if an problem occurs acquiring the connection.

getDefaultProvider

public static SocketTransportProvider getDefaultProvider()
Returns the default transport provider.

Returns:
the SocketTransportProvider.

shutdown

public static void shutdown()


Copyright © 2010 Sapia OSS. All Rights Reserved.