|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoolbus.ToolInstanceManager
public class ToolInstanceManager
This class manages all the tool instances.
Field Summary | |
---|---|
private toolbus.util.collections.ConcurrentHashMap<aterm.ATerm,ToolInstance> |
activeTools
|
private toolbus.util.collections.ConcurrentHashSet<ToolInstance> |
dynamiclyConnectedTools
|
private toolbus.util.collections.ConcurrentHashMap<aterm.ATerm,ToolInstance> |
pendingTools
|
Constructor Summary | |
---|---|
ToolInstanceManager()
Default constructor. |
Method Summary | |
---|---|
ToolInstance |
activateDynamiclyConnectedTool(java.lang.String toolName)
Activates and returns a tool instance of the given type. |
ToolInstance |
activatePendingTool(aterm.ATerm toolKey)
Attempts to activate the tool instance associated with the given key. |
void |
addDynamiclyConnectedTool(ToolInstance toolInstance)
Adds a connect tool instance to the collection. |
void |
addPendingTool(ToolInstance toolInstance)
Adds a tool instance to the list of which the tool application is currently being started. |
ToolInstance |
get(aterm.ATerm toolKey)
Returns the tool with the given id, if it's present in the collection. |
ToolInstance |
getPendingTool(aterm.ATerm toolKey)
Returns the tool with the given key, if it's present in the pending tool collection. |
private ToolInstance |
getReadyDynamiclyConnectedTool(java.lang.String toolName)
Attempts to locate a dynamicly connected tool instance that is ready to be processed by the 'connect atom'. |
void |
killExecutedToolsNow()
Kills all known executed tools immidiately. |
int |
numberOfConnectedTools()
Counts the number of connected tools that are registered with this tool instance manager. |
void |
printQueueTerms()
Prints all currently queued values, events and requests. |
void |
remove(aterm.ATerm toolKey)
Removes the tool instance that is associated with the given id from the collection. |
void |
removeDynamiclyConnectedTool(ToolInstance toolInstance)
Removes the given tool instance from the dynamicly connected tools list (if present). |
void |
removePendingTool(aterm.ATerm toolKey)
Removes the given tool instance from the pending tools list (if present). |
void |
showStatus()
|
void |
shutDown(aterm.ATerm message)
Notifies all tools that the ToolBus was shut down, by sending a terminate(\ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final toolbus.util.collections.ConcurrentHashMap<aterm.ATerm,ToolInstance> activeTools
private final toolbus.util.collections.ConcurrentHashMap<aterm.ATerm,ToolInstance> pendingTools
private final toolbus.util.collections.ConcurrentHashSet<ToolInstance> dynamiclyConnectedTools
Constructor Detail |
---|
public ToolInstanceManager()
Method Detail |
---|
public ToolInstance get(aterm.ATerm toolKey)
toolKey
- The key of the tool we want to retrieve.
public void remove(aterm.ATerm toolKey)
toolKey
- The key of the tool instance that we want to remove.public void addDynamiclyConnectedTool(ToolInstance toolInstance)
toolInstance
- The pending tool instance we want to add.public ToolInstance activateDynamiclyConnectedTool(java.lang.String toolName)
toolName
- The name identifying the type of the tool instance.
private ToolInstance getReadyDynamiclyConnectedTool(java.lang.String toolName)
toolName
- The name of the tool.
public void removeDynamiclyConnectedTool(ToolInstance toolInstance)
toolInstance
- The tool instance that needs to be removed.public void addPendingTool(ToolInstance toolInstance)
toolInstance
- The tool instance we want to add.public ToolInstance getPendingTool(aterm.ATerm toolKey)
toolKey
- The key of the tool we want to retrieve.
public ToolInstance activatePendingTool(aterm.ATerm toolKey)
toolKey
- The key of the tool that has connected.
public void removePendingTool(aterm.ATerm toolKey)
toolKey
- The key that is associated with the tool instance that needs to be removed.public void shutDown(aterm.ATerm message)
message
- The message that will be encapsulated in the terminate message.public void killExecutedToolsNow()
public int numberOfConnectedTools()
public void printQueueTerms()
public void showStatus()
|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |