Jadex 0.941

jadex.tutorial
Agent TranslationF2


agent TranslationF2

TranslationAgent: Lesson F2.

Understanding message event matching.

Explanation

The agent has declared two message event types. Whenever the agent receives a message it has to decide to which message event this message can be mapped. If more than one mapping are valid for a received message the specificity of the declared message events (more specific -> better).


Plan Summary
standard plan egtrans()
           A translation plan, from which a new instance is created whenever a translation request is received.
standard plan notunderstood()
           Reacts on all messages that can not be handled by the the translation plan.
 
Event Summary
messageevent any_message()
           All messages can be also mapped to a any_message, when no more specific mapping can be found.
messageevent failure(String performative)
           The answer message after some error occurred.
messageevent inform(String performative)
           The answer message after success.
messageevent request_translation(String performative)
           Specifies a translation request being all messages with performative request.
 

Plan Detail

egtrans

standard plan egtrans()
A translation plan, from which a new instance is created whenever a translation request is received.

Plan body:
new EnglishGermanTranslationPlanF2()
Message event trigger:
request_translation

notunderstood

standard plan notunderstood()
Reacts on all messages that can not be handled by the the translation plan.

Plan body:
new NotUnderstoodPlan()
Message event trigger:
any_message
Event Detail

request_translation

messageevent request_translation(String performative)
Specifies a translation request being all messages with performative request.

Parameters:
fixed parameter performative Default value:  SFipa.REQUEST
Event flags:
direction: receive
message type: fipa
random selection: false
meta-level reasoning: true
post to all: false

any_message

messageevent any_message()
All messages can be also mapped to a any_message, when no more specific mapping can be found.

Event flags:
direction: receive
message type: fipa
random selection: false
meta-level reasoning: true
post to all: false

inform

messageevent inform(String performative)
The answer message after success.

Parameters:
fixed parameter performative Default value:  SFipa.INFORM
Event flags:
direction: send
message type: fipa
random selection: false
meta-level reasoning: true
post to all: false

failure

messageevent failure(String performative)
The answer message after some error occurred.

Parameters:
fixed parameter performative Default value:  SFipa.FAILURE
Event flags:
direction: send
message type: fipa
random selection: false
meta-level reasoning: true
post to all: false

Jadex 0.941

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-2005 Lars Braubach, Alexander Pokahr, Andrzej Walczak - University of Hamburg. Use is subject to license terms.