com.javageeks.gjas
Class RMIServer

java.lang.Object
  |
  +--com.javageeks.gjas.RMIServer
All Implemented Interfaces:
IServer, java.io.Serializable

public class RMIServer
extends java.lang.Object
implements IServer

RMIServer wraps around another IServer (usually a LocalServer instance) to provide RMI-access.

See Also:
Serialized Form

Constructor Summary
RMIServer(IRemoteServerManager svrMgr, long ID)
           
 
Method Summary
 ConfigProperties getConfigInfo()
          Returns the ConfigurationInfo instance to use for configuration
 java.lang.String getInstanceID()
          Returns the instance ID of the wrapped Service.
 java.lang.Exception getLastError()
          Returns the last Exception thrown, if any, by the wrapped Service.
 java.lang.String getState()
          Returns the state of the wrapped Service.
 void kill()
          Kills the wrapped Service.
 boolean pause()
          Pauses the wrapped Service.
 boolean resume()
          Resumes the wrapped Service.
 void setConfigInfo(ConfigProperties info)
          Set the ConfigurationInfo instance for this Service
 boolean start()
          Start the wrapped Service instance.
 boolean stop()
          Stop the wrapped Service instance; as with start, the Service gets 15 seconds to stop itself before the ServerManager is free to take more drastic steps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMIServer

public RMIServer(IRemoteServerManager svrMgr,
                 long ID)
Method Detail

start

public boolean start()
Start the wrapped Service instance. Services have 15 seconds in which to either initialize, or else start a thread to perform the necessary initialization and return. If a Service fails to respond within 15 seconds of the start of its start call, the Server and/or ServerManager are free to destroy it.
Specified by:
start in interface IServer

stop

public boolean stop()
Stop the wrapped Service instance; as with start, the Service gets 15 seconds to stop itself before the ServerManager is free to take more drastic steps.
Specified by:
stop in interface IServer

pause

public boolean pause()
Pauses the wrapped Service. The Service should respond within 15 seconds of the start of this call; however, failure to do so is not sufficient grounds for the ServerManager or Server to destroy it.
Specified by:
pause in interface IServer

resume

public boolean resume()
Resumes the wrapped Service. The Service should respond within 15 seconds of the start of this call; however, failure to do so is not sufficient grounds for the ServerManager or Server to destroy it.
Specified by:
resume in interface IServer

kill

public void kill()
Kills the wrapped Service.
Specified by:
kill in interface IServer

getState

public java.lang.String getState()
Returns the state of the wrapped Service.
Specified by:
getState in interface IServer

getInstanceID

public java.lang.String getInstanceID()
Returns the instance ID of the wrapped Service.
Specified by:
getInstanceID in interface IServer

getLastError

public java.lang.Exception getLastError()
Returns the last Exception thrown, if any, by the wrapped Service.
Specified by:
getLastError in interface IServer

getConfigInfo

public ConfigProperties getConfigInfo()
Returns the ConfigurationInfo instance to use for configuration
Specified by:
getConfigInfo in interface IServer

setConfigInfo

public void setConfigInfo(ConfigProperties info)
Set the ConfigurationInfo instance for this Service
Specified by:
setConfigInfo in interface IServer