com.javageeks.gjas
Class RMIServerManager
java.lang.Object
|
+--com.javageeks.gjas.RMIServerManager
- All Implemented Interfaces:
- IServerManager
- public class RMIServerManager
- extends java.lang.Object
- implements IServerManager
RMIServerManager is actually a thin Proxy to an RMIServerManagerServer,
which exists within some other JVM (which may or may not be on another
machine).
Note that throughout this class, rather than throw declared exceptions,
we throw RuntimeExceptions (which aren't required to be declared in the
methods' "throws" clause). Doing this allows us to maintain the
IServerManager interface, and, quite frankly, I never saw RemoteException
as a need-to-be-checked Exception type, anyway.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RMIServerManager
public RMIServerManager(java.lang.String host)
throws java.lang.Exception
shutdown
public void shutdown()
- Specified by:
shutdown
in interface IServerManager
deployService
public void deployService(java.lang.String serviceName,
ClassLoaderStrategy strategy)
- Specified by:
deployService
in interface IServerManager
loadService
public IServer loadService(java.lang.String svcName)
- Specified by:
loadService
in interface IServerManager
loadService
public IServer loadService(Service svc)
- Specified by:
loadService
in interface IServerManager
addService
public IServer addService(java.lang.String svcName,
ConfigProperties args)
- Specified by:
addService
in interface IServerManager
addService
public IServer addService(Service svc,
ConfigProperties args)
- Specified by:
addService
in interface IServerManager
removeService
public void removeService(java.lang.String instanceID)
- Specified by:
removeService
in interface IServerManager
killService
public void killService(java.lang.String instanceID)
- Specified by:
killService
in interface IServerManager
getServices
public java.lang.String[] getServices()
- Specified by:
getServices
in interface IServerManager
getService
public IServer getService(java.lang.String instanceID)
- Specified by:
getService
in interface IServerManager
log
public void log(java.lang.String msg)
- Specified by:
log
in interface IServerManager
log
public void log(java.lang.Exception ex)
- Specified by:
log
in interface IServerManager
error
public void error(java.lang.String msg)
- Specified by:
error
in interface IServerManager
error
public void error(java.lang.Exception ex)
- Specified by:
error
in interface IServerManager
main
public static void main(java.lang.String[] args)
throws java.lang.Exception