wt.manager
Class RemoteServerManager

java.lang.Object
  extended by wt.manager.RemoteServerManager

public class RemoteServerManager
extends Object

Class that provides access to a remote server manager. Instances of this class are local (non-remote) objects that encapsulate the communication with a remote server manager object. This encapsulation includes object location, and automatic recovery from communication errors.

The local object represents the "concept" of a remote server manager, not a particular instance of the remote server object. This allows the local object to manage connecting to a server object, and reconnecting to new server objects during error recovery.

Supported API: true
Extendable: false


Method Summary
 Vector getAllServers(String service_name)
          Get all servers for the requested service_name.
static RemoteServerManager getDefault()
          Get default instance of RemoteServerManager.
static RemoteServerManager getInstance(URL server_codebase)
          Get instance of RemoteServermanager corresponding to the given server codebase URL.
 Remote getNextServer(String service_name, Remote server)
          Get the next available server for the requested service_name.
 Remote getServer(String service_name)
          Get reference to a remote server object.
 Remote getServer(String service_name, int start_num)
          Get reference to a remote server object.
static void main(String[] args)
          Simple tester Displays info from the default server.
 void ping()
          A no-op method available for testing communication.
 void stop()
          Stop the remote server manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RemoteServerManager getInstance(URL server_codebase)
Get instance of RemoteServermanager corresponding to the given server codebase URL.

Supported API: true

Parameters:
server_codebase - the server codebase URL

getDefault

public static RemoteServerManager getDefault()
Get default instance of RemoteServerManager. The default instance is the one corresponding to the server codebase of the current thread as returned by the WTProperties class.

Supported API: true

See Also:
WTProperties

getServer

public Remote getServer(String service_name)
                 throws RemoteException
Get reference to a remote server object. A service name is used to identify the type of server desired. If no server is available, one will be started by the server manager.

Supported API: true

Parameters:
service_name - the corresponding service name
Returns:
a remote server reference
Throws:
RemoteException

getServer

public Remote getServer(String service_name,
                        int start_num)
                 throws RemoteException
Get reference to a remote server object. A service name is used to identify the type of server desired. If no server is available, one will be started by the server manager.

Supported API: true

Parameters:
service_name - the corresponding service name
start_num - used in start up of multiple servers for this service
Returns:
a remote server reference
Throws:
RemoteException

getNextServer

public Remote getNextServer(String service_name,
                            Remote server)
                     throws RemoteException
Get the next available server for the requested service_name. The previous server is used for a reference and if no other server is available, null is returned. This method is used by servers that wish to redirect clients to other servers when doing load leveling.

Supported API: true

Parameters:
service_name - corresponding service name
server - previous server
Throws:
RemoteException

getAllServers

public Vector getAllServers(String service_name)
                     throws RemoteException
Get all servers for the requested service_name.

Supported API: true

Parameters:
service_name - corresponding service name
Returns:
a vector of remote server references
Throws:
RemoteException

ping

public void ping()
          throws RemoteException
A no-op method available for testing communication.

Supported API: true

Throws:
RemoteException

stop

public void stop()
          throws RemoteException
Stop the remote server manager. Only calls originating from the server manager's local host will be honored.

Supported API: true

Throws:
RemoteException

main

public static void main(String[] args)
                 throws RemoteException
Simple tester Displays info from the default server.

Supported API: true

Throws:
RemoteException