fr.dyade.aaa.agent
Class AgentDriver
public abstract class AgentDriver
protected Queue | mq - queue of
Notification objects to be sent
|
protected AgentId | proxy - id of associated proxy agent
|
void | close()
|
protected void | end() - Finalizes the driver.
|
protected void | react(Notification m) - Reacts to notifications from proxy.
|
void | run() - Actually executes the driver code.
|
String | toString() - Provides a string image for this object.
|
mq
protected Queue mq
queue of Notification
objects to be sent
proxy
protected AgentId proxy
id of associated proxy agent
AgentDriver
protected AgentDriver(int id,
Agent proxy,
Queue mq)
Constructor.
proxy
- id of associated proxy agentmq
- queue of Notification
objects to be sent
close
public void close()
- close in interface Driver
end
protected void end()
Finalizes the driver.
Reports driver end to the proxy agent, with a DriverDone
notification.
- end in interface Driver
react
protected void react(Notification m)
throws Exception
Reacts to notifications from proxy.
run
public void run()
Actually executes the driver code.
To be defined in derived classes.
Beware: this code is executed in a separate thread, outside from any
transaction. Notifications may be sent using function
sendTo
,
and they will actually be sent as soon as the function is called; there is
no atomic treatment as there is in an agent reaction.
- run in interface Driver
toString
public String toString()
Provides a string image for this object.
- toString in interface Driver
Copyright B) 2004 Scalagent - All rights reserved