Jadex 0.96-beta1

jadex.adapter
Interface IAgentAdapter


public interface IAgentAdapter

The adapter for a specific platform agent (e.g. a Jade agent). These are the methods a Jadex agents needs to call on its host agent.


Method Summary
 void cleanupAgent()
          This is called, after the agent has decided to kill itself.
 AgentIdentifier getAgentIdentifier()
          Return the native agent-identifier that allows to send messages to this agent.
 IMessageEventTransport[] getMessageEventTransports()
          Get all avaiable transports available on the native platform.
 String getPlatformType()
          Used to determine the platform type.
 void notifyIn(long millis)
          Notify the agent in a time interval.
 void wakeup()
          Called by the agent when it probably awoke from an idle state.
 

Method Detail

wakeup

void wakeup()
Called by the agent when it probably awoke from an idle state. The platform has to make sure that the agent will be executed again from now on. Note, this method can be called also from external threads (e.g. property changes). Therefore, on the calling thread no agent related actions must be executed (use some kind of wake-up mechanism). Also proper synchronization has to be made sure, as this method can be called concurrently from different threads.


notifyIn

void notifyIn(long millis)
Notify the agent in a time interval. This method is called by the jadex agent to realize internal timing issues. The platform only has to consider the last call of this method, and may forget about earlier notification requests. The method should return immediately, after saving the notification request. When the notification is due, the platform has to call the IJadexAgent.notifyDue() method.

Parameters:
millis - The relative time in millis (-1 if the agent no longer whishes to be notified)..

cleanupAgent

void cleanupAgent()
This is called, after the agent has decided to kill itself. All platform-specific resources/entries regarding the agent should now be removed.


getPlatformType

String getPlatformType()
Used to determine the platform type. Each adapter implementation should provide the value of a constant defined somewhere. Using the platform type, e.g. plan context conditions can check if plans are applicable in current context.


getAgentIdentifier

AgentIdentifier getAgentIdentifier()
Return the native agent-identifier that allows to send messages to this agent.


getMessageEventTransports

IMessageEventTransport[] getMessageEventTransports()
Get all avaiable transports available on the native platform.

Returns:
All transports. // todo: remove

Jadex 0.96-beta1

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.