org.sapia.ubik.rmi.server.transport.socket
Class SocketTransportProvider

java.lang.Object
  extended by org.sapia.ubik.rmi.server.transport.socket.SocketTransportProvider
All Implemented Interfaces:
TransportProvider
Direct Known Subclasses:
MultiplexSocketTransportProvider

public class SocketTransportProvider
extends java.lang.Object
implements TransportProvider

Implements the TransportProvider interface over standard java socket.

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
See Also:
Socket

Field Summary
static java.lang.String BIND_ADDRESS
          This constant corresponds to the ubik.rmi.transport.socket.bind-address system property.
static java.lang.String CLIENT_FACTORY
          This constant corresponds to the ubik.rmi.transport.socket.client-factory system property.
static long DEFAULT_RESET_INTERVAL
           
static java.lang.String MAX_THREADS
          This constant corresponds to the ubik.rmi.transport.socket.max-threads system property.
static java.lang.String PORT
          This constant corresponds to the ubik.rmi.transport.socket.port system property.
static java.lang.String SERVER_FACTORY
          This constant corresponds to the ubik.rmi.transport.socket.server-factory system property.
static java.lang.String TRANSPORT_TYPE
          Constant corresponding to this provider class' transport type.
 
Constructor Summary
SocketTransportProvider()
           
 
Method Summary
protected  Server doNewServer(int port, PropUtil pu)
           
 Connections getPoolFor(ServerAddress address)
          Returns a client connection pool to the given server address.
 java.lang.String getTransportType()
          Returns this instance's "transport type".
 Server newDefaultServer()
          This method is called by Ubik RMI's runtime when a server is needed on the client side to recieve asynchronous responses (i.e.: callbacks).
 Server newServer(int port)
           
 Server newServer(java.util.Properties props)
          Returns a server implementation.
 void shutdown()
          Shuts down this provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSPORT_TYPE

public static final java.lang.String TRANSPORT_TYPE
Constant corresponding to this provider class' transport type.

See Also:
Constant Field Values

MAX_THREADS

public static final java.lang.String MAX_THREADS
This constant corresponds to the ubik.rmi.transport.socket.max-threads system property.

See Also:
Constant Field Values

CLIENT_FACTORY

public static final java.lang.String CLIENT_FACTORY
This constant corresponds to the ubik.rmi.transport.socket.client-factory system property.

See Also:
Constant Field Values

SERVER_FACTORY

public static final java.lang.String SERVER_FACTORY
This constant corresponds to the ubik.rmi.transport.socket.server-factory system property. It identifies the UbikServerSocketFactory implementation to use.

See Also:
Constant Field Values

BIND_ADDRESS

public static final java.lang.String BIND_ADDRESS
This constant corresponds to the ubik.rmi.transport.socket.bind-address system property.

See Also:
Constant Field Values

PORT

public static final java.lang.String PORT
This constant corresponds to the ubik.rmi.transport.socket.port system property.

See Also:
Constant Field Values

DEFAULT_RESET_INTERVAL

public static final long DEFAULT_RESET_INTERVAL
See Also:
Constant Field Values
Constructor Detail

SocketTransportProvider

public SocketTransportProvider()
Method Detail

getPoolFor

public Connections getPoolFor(ServerAddress address)
                       throws java.rmi.RemoteException
Description copied from interface: TransportProvider
Returns a client connection pool to the given server address.

Specified by:
getPoolFor in interface TransportProvider
Parameters:
address - a ServerAddress.
Returns:
a Connection.
Throws:
java.rmi.RemoteException - if a problem occurs creating the connection.
See Also:
TransportProvider.getPoolFor(ServerAddress)

newServer

public Server newServer(java.util.Properties props)
                 throws java.rmi.RemoteException
Description copied from interface: TransportProvider
Returns a server implementation.

Specified by:
newServer in interface TransportProvider
Parameters:
props - the Properties used to create the server.
Returns:
a Server instance.
Throws:
java.rmi.RemoteException
See Also:
TransportProvider.newServer(Properties)

newDefaultServer

public Server newDefaultServer()
                        throws java.rmi.RemoteException
Description copied from interface: TransportProvider
This method is called by Ubik RMI's runtime when a server is needed on the client side to recieve asynchronous responses (i.e.: callbacks). Implementations must in this case provide a "default" Server instance.

Specified by:
newDefaultServer in interface TransportProvider
Returns:
a Server.
Throws:
java.rmi.RemoteException
See Also:
TransportProvider.newDefaultServer()

newServer

public Server newServer(int port)
                 throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

doNewServer

protected Server doNewServer(int port,
                             PropUtil pu)
                      throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getTransportType

public java.lang.String getTransportType()
Description copied from interface: TransportProvider
Returns this instance's "transport type".

Specified by:
getTransportType in interface TransportProvider
Returns:
a transport type.
See Also:
TransportProvider.getTransportType()

shutdown

public void shutdown()
Description copied from interface: TransportProvider
Shuts down this provider.

Specified by:
shutdown in interface TransportProvider
See Also:
TransportProvider.shutdown()


Copyright © 2010 Sapia OSS. All Rights Reserved.