
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 void |
addStatusBusListener(ScriptingStatusBusListener listener,
ScriptingStatusBusMessageFilter filter)
Add a Status bus listener with a filter.
|
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 AgentMessagingLayer |
getMessagingAccess() |
protected static List<String> |
getTargetsForSubsystem(String subsystemName) |
static boolean |
getThrowExceptions()
Returns true if exceptions are thrown, otherwise they are returned as the
Object on the invoke methods.
|
static void |
initializeScriptingEnvironment()
In a test context, this method has to be called in the first place
|
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 void |
shutdownScriptingEnvironment()
In a test context, this method has to be called in the first place
|
static Future<ScriptingStatusBusMessage> |
startListeningForStatusBusMessage(ScriptingStatusBusMessageFilter filter,
int timeout)
Get a Future on a ScriptingStatusBusMessage.
|
public static AgentMessagingLayer getMessagingAccess()
public static void initializeScriptingEnvironment()
public static void shutdownScriptingEnvironment()
throws Exception
Exceptionpublic 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 addStatusBusListener(ScriptingStatusBusListener listener, ScriptingStatusBusMessageFilter filter)
listener - The ScriptingStatusListenerfilter - The ScriptingStatusBusMessageFilterpublic static void removeStatusBusListener(ScriptingStatusBusListener listener)
listener - The listener to be removed.public 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 © 2016 LSST. All rights reserved.