|
The Meta-Environment API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttoolbus.adapter.AbstractTool
public abstract class AbstractTool
This class facilitates the functions a tool needs to be able to functions.
| Field Summary | |
|---|---|
static java.lang.String |
DIRECTTOOL
|
private static int |
PACKBUFFERSIZE
|
static java.lang.String |
REMOTETOOL
|
private static aterm.AFun |
SYMBOL_SAF
|
protected static aterm.pure.PureFactory |
termFactory
|
protected ToolBridge |
toolBridge
This variable MUST be set before tool interaction can take place. |
| Fields inherited from interface toolbus.IOperations |
|---|
ACKDO, ACKEVENT, CONNECT, DEBUGPERFORMANCESTATS, DISCONNECT, DO, END, EVAL, EVENT, PERFORMANCESTATS, REQUEST, RESPONSE, TERMINATE, UNDEFINED, VALUE |
| Constructor Summary | |
|---|---|
AbstractTool()
Default constructor. |
|
| Method Summary | |
|---|---|
abstract void |
connect(java.lang.String[] args)
Connects to the ToolBus. |
void |
disconnect(aterm.ATerm aTerm)
Sends a disconnect request to the ToolBus. |
static aterm.pure.PureFactory |
getFactory()
Returns a reference to the aterm factory. |
ToolBridge |
getToolBridge()
Returns a reference to the tool bridge that we're using. |
static aterm.ATerm |
pack(aterm.ATerm termData)
Packs the given term. |
abstract void |
receiveAckEvent(aterm.ATerm aTerm)
Receives an acknowledgement message. |
abstract void |
receiveTerminate(aterm.ATerm aTerm)
Receives a termination message. |
void |
sendEvent(aterm.ATerm aTerm)
Posts an event to the ToolBus. |
aterm.ATermAppl |
sendRequest(aterm.ATerm aTerm)
Posts a request to the ToolBus. |
void |
setToolBridge(ToolBridge toolBridge)
Sets the reference ot the tool bridge we're using. |
void |
terminate()
Terminated this Tool. |
static aterm.ATerm |
unpack(aterm.ATerm packedTerm)
Unpacks the given term. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final aterm.pure.PureFactory termFactory
public static final java.lang.String DIRECTTOOL
public static final java.lang.String REMOTETOOL
private static final int PACKBUFFERSIZE
private static final aterm.AFun SYMBOL_SAF
protected ToolBridge toolBridge
| Constructor Detail |
|---|
public AbstractTool()
| Method Detail |
|---|
public abstract void connect(java.lang.String[] args)
throws java.lang.Exception
args - The arguments that contain the required information for running a tool (name + id
and additionally the host + port of the ToolBus, depending on how this tool is
connected to the ToolBus).
java.lang.Exception - Thrown when something goes wrong during the parsing of the arguments or the
establishing of the connection.public void setToolBridge(ToolBridge toolBridge)
toolBridge - The reference ot the tool bridge we're using.public ToolBridge getToolBridge()
public static aterm.pure.PureFactory getFactory()
public void sendEvent(aterm.ATerm aTerm)
aTerm - The term that contains the data about the event.public aterm.ATermAppl sendRequest(aterm.ATerm aTerm)
aTerm - The term that contains the data about the request.
public void disconnect(aterm.ATerm aTerm)
aTerm - The term that contains information about the event.public void terminate()
public abstract void receiveAckEvent(aterm.ATerm aTerm)
aTerm - The term containing information about the acknowledgement.public abstract void receiveTerminate(aterm.ATerm aTerm)
aTerm - The term containing information about the termination.public static aterm.ATerm pack(aterm.ATerm termData)
termData - The term that needs to be packed.
public static aterm.ATerm unpack(aterm.ATerm packedTerm)
packedTerm - The term that needs to be unpacked.
|
The Meta-Environment API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||