com.cosylab.jcosyne.server
Interface SentinelMBean

All Superinterfaces:
RemoteTaskMBean, java.lang.Runnable
All Known Implementing Classes:
Sentinel

public interface SentinelMBean
extends RemoteTaskMBean

Sentinel is a remote task that shuts down all remote tasks and sends notification to the server that it should terminate. Batch files can be set so that if the server terminates with certain exist code, it is restarted automatically, possibly also reloading classes from the classpath (if they have changed).

Author:
Gasper Tkacik (gasper.tkacik@cosylab.com)

Method Summary
 void shutdownServer(int restart)
          Terminate all active tasks, shutdown signal sent to the server.
 
Methods inherited from interface com.cosylab.jcosyne.server.RemoteTaskMBean
copyStateFrom, copyStateFrom, equals, executeScript, getLastScriptResult, getName, getPostExecutionScript, getPostInitializactionScript, getProgress, getState, hashCode, initialize, isFinished, isInitialized, isReadyToRun, isRunning, isSuspended, setPostExecutionScript, setPostInitializationScript, setRunning, setSuspended
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

shutdownServer

public void shutdownServer(int restart)
Terminate all active tasks, shutdown signal sent to the server.

Parameters:
restart - the exit code with which to force the exist if the exception is thrown during shutdown