|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.manager.RemoteServerManager
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
Field Summary | |
private static Hashtable |
codebaseMap
|
protected Registry |
currentRegistry
|
protected ServerManager |
currentServerManager
|
private static Object |
lock
|
private static int |
MARSHAL_RETRY
|
private static int |
OTHER_RETRY
|
private static Object |
remoteServerManagerKey
|
private static String |
RESOURCE
|
private URL |
serverCodebase
|
static boolean |
ServerFlag
0 Server Manager flag - used to control conditional behavior in classes that may run in the server manager as well as outside the server manager. |
private static boolean |
VERBOSE_CLIENT
|
Constructor Summary | |
protected |
RemoteServerManager(URL server_codebase)
Construct a new RemoteServerManager object. |
Method Summary | |
Vector |
getAllServers(String service_name)
Get all servers for the requested service_name. |
static RemoteServerManager |
getDefault()
Get default instance of RemoteServerManager . |
ServerManagerInfo |
getInfo()
Get usage information. |
static RemoteServerManager |
getInstance(URL server_codebase)
Get instance of RemoteServermanager corresponding to the given
server codebase URL. |
protected String |
getMessage(String key)
Supported API: false |
Remote |
getNextServer(String service_name,
Remote server)
Get the next available server for the requested service_name. |
protected Registry |
getRegistry(Registry prev_registry)
Get a remote registry instance associated with this RemoteMethodServer
object. |
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. |
protected ServerManager |
getServerManager(ServerManager prev_server_manager)
Get a remote server manager instance associated with this RemoteServerManager
object. |
static void |
main(String[] args)
Simple tester Displays info from the default server. |
private static RemoteException |
newRemoteException(String msg,
Throwable t)
|
void |
ping()
A no-op method available for testing communication. |
private static void |
printRegistryException(RemoteException e)
|
private static void |
printRemoteException(RemoteException e)
|
void |
registerServer(String service_name,
Remote server)
Register a new server instance. |
void |
reportDeadServer(String service_name,
Remote server)
Report a bad remote server reference. |
void |
reportDeadServer(String service_name,
Remote server,
Exception report_exception)
Report a bad remote server reference. |
private void |
reportIncompatibleCodebase(String local_version,
String server_version)
|
(package private) void |
setServerManager(ServerManager server_manager)
|
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 |
Field Detail |
private static final String RESOURCE
public static boolean ServerFlag
private static final int MARSHAL_RETRY
private static final int OTHER_RETRY
private static final boolean VERBOSE_CLIENT
private static final Object remoteServerManagerKey
private static Hashtable codebaseMap
private static Object lock
private URL serverCodebase
protected Registry currentRegistry
protected ServerManager currentServerManager
Constructor Detail |
protected RemoteServerManager(URL server_codebase)
RemoteServerManager
object.
The server_codebase
argument is used to load
server properties necessary to establish communication with
the remote server manager.
server_codebase
- the server codebase URLMethod Detail |
void setServerManager(ServerManager server_manager)
public static RemoteServerManager getInstance(URL server_codebase)
RemoteServermanager
corresponding to the given
server codebase URL.
server_codebase
- the server codebase URLpublic static RemoteServerManager getDefault()
RemoteServerManager
.
The default instance is the one corresponding to the server codebase of the
current thread as returned by the WTProperties class.
WTProperties
public void registerServer(String service_name, Remote server) throws RemoteException
service_name
- service name corresponding to this remote server instanceserver
- the remote server instance
RemoteException
public Remote getServer(String service_name) throws RemoteException
service_name
- the corresponding service name
RemoteException
public Remote getServer(String service_name, int start_num) throws RemoteException
service_name
- the corresponding service namestart_num
- used in start up of multiple servers for this service
RemoteException
public Remote getNextServer(String service_name, Remote server) throws RemoteException
service_name
- corresponding service nameserver
- previous server
RemoteException
public Vector getAllServers(String service_name) throws RemoteException
service_name
- corresponding service name
RemoteException
public void reportDeadServer(String service_name, Remote server) throws RemoteException
service_name
- corresponding service nameserver
- the remote server reference
RemoteException
public void reportDeadServer(String service_name, Remote server, Exception report_exception) throws RemoteException
service_name
- corresponding service nameserver
- the remote server referencereport_exception
- exception to report
RemoteException
public ServerManagerInfo getInfo() throws RemoteException
RemoteException
public void ping() throws RemoteException
RemoteException
public void stop() throws RemoteException
RemoteException
protected ServerManager getServerManager(ServerManager prev_server_manager) throws RemoteException
RemoteServerManager
object. This is used to establish the association with a remote server manager object,
or to reestablish a new association during exception handling.
prev_server_manager
- previous remote instance (null to force new association)
RemoteException
private static void printRemoteException(RemoteException e)
private static void printRegistryException(RemoteException e)
protected Registry getRegistry(Registry prev_registry) throws RemoteException
RemoteMethodServer
object. This is used to establish the association with a remote registry object,
or to reestablish a new association during exception handling.
prev_registry
- previous remote instance (null to force new association)
RemoteException
private void reportIncompatibleCodebase(String local_version, String server_version)
private static RemoteException newRemoteException(String msg, Throwable t)
protected String getMessage(String key)
public static void main(String[] args) throws RemoteException
RemoteException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |