
public abstract class CCS extends Object
ScriptingSubsystemWrapper, register a ScriptingStatusBusListener to
listen to Status messages on the CCS Status Bus and to suspend the script execution
until a given Status message meets the criteria of a filter: ScriptingStatusBusMessageFilter.| Modifier and Type | Method and Description |
|---|---|
static void |
addStatusBusListener(ScriptingStatusBusListener listener)
Add a Status bus listener.
|
static ScriptingSubsystemWrapper |
attachSubsystem(String subsystemName)
Creates and instance of a ScriptingSubsystemWrapper by making sure that the given subsystemName
corresponds to a CCS subsystem that is currently available, not locked and alive.
|
static void |
cleanUp()
Clean up the ThreadLocal stack, (close all subsystems and remove all listeners).
|
static boolean |
getThrowExceptions()
Returns true if exceptions are thrown, otherwise they are returned as the
Object on the invoke methods.
|
static void |
removeStatusBusListener(ScriptingStatusBusListener listener)
Removes the Status bus listener.
|
static void |
setThrowExceptions(boolean throwExceptions)
In the scripting environment, exceptions resulted from method invocation can either
be thrown or returned.
|
static Future<ScriptingStatusBusMessage> |
startListeningForStatusBusMessage(ScriptingStatusBusMessageFilter filter,
int timeout)
Get a Future on a ScriptingStatusBusMessage.
|
static ScriptingStatusBusMessage |
waitForStatusBusMessage(ScriptingStatusBusMessageFilter filter,
int timeout)
Deprecated.
|
public static void setThrowExceptions(boolean throwExceptions)
throwExceptions - boolean flag. If true exceptions will be thrown.public static boolean getThrowExceptions()
public static ScriptingSubsystemWrapper attachSubsystem(String subsystemName) throws RuntimeException
subsystemName - The name of the CCS subsystem. e.g. ccs-rafts.RuntimeExceptionpublic static void cleanUp()
public static void addStatusBusListener(ScriptingStatusBusListener listener)
listener - The ScriptingStatusListenerpublic static void removeStatusBusListener(ScriptingStatusBusListener listener)
listener - The listener to be removed.@Deprecated public static ScriptingStatusBusMessage waitForStatusBusMessage(ScriptingStatusBusMessageFilter filter, int timeout) throws ScriptingTimeoutException
filter - ScriptingStatusBusMessageFilter The message filtertimeout - Timeout in seconds, after which a ScriptiongTimeoutException is thrown.ScriptingTimeoutExceptionpublic static Future<ScriptingStatusBusMessage> startListeningForStatusBusMessage(ScriptingStatusBusMessageFilter filter, int timeout)
filter - ScriptingStatusBusMessageFilter The message filtertimeout - Timeout in seconds, after which a ScriptiongTimeoutException is thrown. This timeout is from the time the method is invoked.
If this timeout is reached an exception will be thrown if/when the Future is exercised.Copyright © 2015 LSST. All rights reserved.