Jadex 0.96-beta1

jadex.adapter
Interface IMessageAdapter

All Known Implementing Classes:
AbstractMessageAdapter, FipaMessageAdapter

public interface IMessageAdapter

Interface for external messages to be passed to a Jadex agent. The methods of this interface are called in the following order:

  1. The system checks if the message is a reply to a message sent earlier using calling the getValue() method for conversation identifying parameters.
  2. The match() method is used to check which event type(s) can be used to represent the message. When the message is a reply, only event types of correponding capabilities are checked.
  3. The getMessage() method is provided to allow access to the message representation of the underlying platform (e.g. from plans). This method may be called several times.


Method Summary
 String getId()
          Get the unique message id.
 Object getMessage()
          Get the platform message.
 Object getValue(String name, jadex.runtime.impl.RCapability scope)
          Get a parameter or parameter set value.
 boolean match(IMMessageEvent msgevent)
          todo: is it possible to remove this method somehow?
 

Method Detail

match

boolean match(IMMessageEvent msgevent)
todo: is it possible to remove this method somehow? Match a message with a message event.

Parameters:
msgevent - The message event.
Returns:
True, if message matches the message event.

getMessage

Object getMessage()
Get the platform message.

Returns:
The platform specific message.

getValue

Object getValue(String name,
                jadex.runtime.impl.RCapability scope)
Get a parameter or parameter set value. The value must possibly converted to the Jadex format, e.g. when native agent identifiers are used.

Returns:
The value or array of values of the parameter (set).

getId

String getId()
Get the unique message id.

Returns:
The id of this message.

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.