Method Summary |
|
abstract public void | addEndPoint(EndPoint endPoint) Adds a new
EndPoint to this engine. |
abstract public EndPoint | addEndPoint(String endPointName, String endpointURL) Creates and adds a new
EndPoint to this engine.
See
this document for details.
Parameters: endPointName - name of the endpoint. |
abstract public Map<String, EndPoint> | addEndPoints(Properties endpointURLs) Adds multiple
EndPoint s to this engine at once.
Suppose you have a property file like this:
email1=smtp://hangman@kohsuke.org!pop3://username:password@mail.kohsuke.org
email2=smtp://oracle@kohsuke.org!pop3://username:password@mail.kohsuke.org
You can then read this file into
Properties , and then pass that
into this method to add two
EndPoint s with one method call.
This is convenient when you are externalizing the endpoint configuration
in a property file.
Parameters: endpointURLs - Properties that has the endpoint name as a key andendpoint URL as a value. |
abstract public void | addListener(EngineListener listener) Adds an
EngineListener to this engine. |
abstract public void | configureWithBSF(File scriptFile) Configures an engine by using Bean Scripting Framework.
This method is intended to run a script that configures endpoints.
By moving the endpoint configuration to a script, you can allow it
to be changed at runtime.
For this method to work, you need to have:
- bsf.jar in your classpath
- scripting language engine that you use in your classpath
(for example, if you use BeanShell, you need bsh.jar)
The file extension is used to determine the scripting language engine.
For the list of languages available out-of-box with BSF and their
registered file extensions, see
this document.
For example, beanshell is ".bsh", groovy is ".groovy", JavaScript is ".js".
The
Engine object is made available to the script with the name 'engine'.
Parameters: scriptFile - The file that contains the script to be run. |
abstract public Conversation | createConversation(Workflow workflow) Creates a new managed workflow instance.
This method starts the given
Workflow as a dalma-managed
workflow instance inside this engine.
Parameters: workflow - The workflow program to be run. |
abstract public Conversation | createConversation(Runnable workflow) Creates a new managed workflow instance. |
abstract public Conversation | getConversation(int id) Gets the
Conversation of a specific ID. |
abstract public Collection<Conversation> | getConversations() Returns the list of
Conversation s in this engine.
always return non-null collection. |
abstract public int | getConversationsSize() Gets the number of
Conversation s in this engine. |
abstract public EndPoint | getEndPoint(String name) Gets the
EndPoint of the given name. |
abstract public Map<String, EndPoint> | getEndPoints() Gets a read-only copy of all the
EndPoint s in this engine. |
abstract public ErrorHandler | getErrorHandler() Gets the
ErrorHandler .
This method returns the value set by the last
Engine.setErrorHandler(ErrorHandler) invocation. |
abstract public Date | getLastActiveTime() Gets the timestamp when any of the conversations run last time. |
abstract public boolean | isStarted() Returns true if the engine has already
Engine.start() started . |
abstract public void | removeListener(EngineListener listener) Removes an existing
EngineListener to this engine. |
abstract public void | setErrorHandler(ErrorHandler errorHandler) Sets the
ErrorHandler . |
abstract public void | setLogger(Logger logger) Sets the logger that this engine uses. |
abstract public void | start() Starts the engine and activates all the
EndPoint s. |
abstract public void | stop() Stops the engine and releases all the resources it acquired. |
abstract public void | waitForCompletion() Waits until all the conversation in the engine exits. |