Jadex 0.96-beta1

jadex.adapter
Interface IJadexAgent


public interface IJadexAgent

Jadex agent interface to be used (invoked) by adapters. To create a jadex agent instance use the factory @link{JadexAgentFactory}.


Method Summary
 boolean executeAction()
          Main method to perform agent execution.
 Logger getLogger()
          Get the logger for the agent.
 Object getProperty(String name)
          Get a property of the agent as defined in the ADF, or any enclosed capabilities.
 String[] getPropertyNames(String name)
          Get property names matching the specified start string.
 void killAgent()
          Request agent to kill itself.
 jadex.runtime.impl.RCapability lookupCapability(IMCapability mcap)
          WARNING.
 void messageArrived(IMessageAdapter message)
          Inform the agent that a message has arrived.
 void notifyDue()
          Notify the agent after the notifyIn time has elapsed.
 

Method Detail

executeAction

boolean executeAction()
Main method to perform agent execution. Whenever this method is called, the agent performs one of its scheduled actions. The platform can provide different execution models for agents (e.g. thread based, or synchroneous). To avoid idle waiting, the return value can be checked.

Returns:
True, when there are more actions waiting to be executed.

notifyDue

void notifyDue()
Notify the agent after the notifyIn time has elapsed.

See Also:
IAgentAdapter.notifyIn(long)

messageArrived

void messageArrived(IMessageAdapter message)
Inform the agent that a message has arrived.

Parameters:
message - The message that arrived.

killAgent

void killAgent()
Request agent to kill itself.


getLogger

Logger getLogger()
Get the logger for the agent.

Returns:
The logger object.

getProperty

Object getProperty(String name)
Get a property of the agent as defined in the ADF, or any enclosed capabilities.


getPropertyNames

String[] getPropertyNames(String name)
Get property names matching the specified start string.

Returns:
Matching property names of the agent as defined in the ADF, or any enclosed capabilities.

lookupCapability

jadex.runtime.impl.RCapability lookupCapability(IMCapability mcap)
WARNING. Does only work when MCapabilities are loaded as prototypes! (hack?) Get the capability for the capability model.

Parameters:
mcap - The model capability.
Returns:
The corresponding runtime capability.

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.