Package ptolemy.actor.lib.jjs
Interface AccessorOrchestrator
-
- All Superinterfaces:
Nameable
- All Known Implementing Classes:
JavaScript
,JSAccessor
,NashornAccessorHostApplication.ActorSubstitute
public interface AccessorOrchestrator extends Nameable
Interface for classes that can orchestrate the execution of accessors. An implementation of this interface accepts requests to invoke callback functions (via theinvokeCallback(Runnable)
method). It promises that all such callback functions are mutually atomic. This interface extends Nameable so that error reporting is more complete. FIXME: More- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Red (bilung)
- Pt.ProposedRating:
- Yellow (eal)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearInterval(java.lang.Object timer)
Clear the interval with the specified handle, if it has not already executed.void
clearTimeout(java.lang.Object timer)
Clear the timeout with the specified handle, if it has not already executed.void
error(java.lang.String message)
Report an error.void
invokeCallback(java.lang.Runnable function)
Invoke the specified function as soon as possible, but after any currently executing or other pending callbacks have completed.void
log(java.lang.String message)
Print a message.java.lang.Object
setInterval(java.lang.Runnable function, long milliseconds)
Invoke the specified function after the specified amount of time and again at multiples of that time.java.lang.Object
setTimeout(java.lang.Runnable function, long milliseconds)
Invoke the specified function after the specified amount of time.void
wrapup()
Cancel all pending callbacks and stop responding to future callbacks.-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Method Detail
-
clearInterval
void clearInterval(java.lang.Object timer) throws IllegalActionException
Clear the interval with the specified handle, if it has not already executed.- Parameters:
timer
- The timeout handle.- Throws:
IllegalActionException
- If the handle is invalid.- See Also:
setTimeout(Runnable, long)
,setInterval(Runnable, long)
-
clearTimeout
void clearTimeout(java.lang.Object timer) throws IllegalActionException
Clear the timeout with the specified handle, if it has not already executed.- Parameters:
timer
- The timeout handle.- Throws:
IllegalActionException
- If the handle is invalid.- See Also:
setTimeout(Runnable, long)
,setInterval(Runnable, long)
-
invokeCallback
void invokeCallback(java.lang.Runnable function) throws IllegalActionException
Invoke the specified function as soon as possible, but after any currently executing or other pending callbacks have completed.- Parameters:
function
- The function to invoke.- Throws:
IllegalActionException
- If the request cannot be honored.
-
error
void error(java.lang.String message)
Report an error.- Parameters:
message
- The error message.
-
log
void log(java.lang.String message)
Print a message.- Parameters:
message
- The message to be printed.
-
setInterval
java.lang.Object setInterval(java.lang.Runnable function, long milliseconds) throws IllegalActionException
Invoke the specified function after the specified amount of time and again at multiples of that time.- Parameters:
function
- The function to invoke.milliseconds
- The number of milliseconds in the future to first invoke it.- Returns:
- A unique ID for this callback.
- Throws:
IllegalActionException
- If the director cannot respect the request.- See Also:
clearTimeout(Object)
-
setTimeout
java.lang.Object setTimeout(java.lang.Runnable function, long milliseconds) throws IllegalActionException
Invoke the specified function after the specified amount of time.- Parameters:
function
- The function to invoke.milliseconds
- The number of milliseconds in the future to invoke it.- Returns:
- A unique ID for this callback.
- Throws:
IllegalActionException
- If the director cannot respect the request.- See Also:
clearTimeout(Object)
-
wrapup
void wrapup() throws IllegalActionException
Cancel all pending callbacks and stop responding to future callbacks.- Throws:
IllegalActionException
- If there is a problem wrapping up.
-
-