JACK 5.4 Application Interface

aos.jack.jak.event
Class MessageEvent

java.lang.Object
  extended byaos.jack.jak.util.Watchable
      extended byaos.jack.jak.fsm.FSM
          extended byaos.jack.jak.event.Event
              extended byaos.jack.jak.event.MessageEvent
All Implemented Interfaces:
aos.apib.Base, ObservableInt, java.io.Serializable
Direct Known Subclasses:
BDIMessageEvent, TimeControl, TracedMessageEvent

public class MessageEvent
extends Event
implements aos.apib.Base, java.io.Serializable

MessageEvent is a base class for events. All inter-agent messages extend MessageEvent.

See Also:
Serialized Form

Field Summary
 java.lang.String from
          The name of the sending agent.
 java.lang.String ident
          Message identification.
 java.lang.String message
          The trace string to display for this message.
 int mid
          The message id number.
 int rmid
          The message reply id number.
 
Fields inherited from class aos.jack.jak.event.Event
behavior, priority, relevant, task
 
Constructor Summary
MessageEvent()
           
 
Method Summary
 MessageEvent getReply()
          Gets next reply from the message's reply queue.
 void lostReply(Agent a1, java.lang.String a2)
          Callback that is invoked when a reply arrives but the source has been discarded.
 Cursor replied()
          Returns true when the message's reply queue is non-empty.
 void traceReceived(Agent a1)
          Callback that is invoked for the receiving agent when the message is received.
 void traceSent(Agent a1)
          Callback that is invoked for the sending agent when the message is sent.
 
Methods inherited from class aos.jack.jak.event.Event
computeFirstApplicable, dump, getEventName, getVariable, getVariable, getVariableValue, getVariableValue, gotException, init_sentinel, isFailed, isPassed, isRunning, remove, stateInfo, variableNames, variableTypes
 
Methods inherited from class aos.jack.jak.fsm.FSM
describe, discard, exceptionInfo, getAgent, getPreferredPriority, init, loadClass, restart, run, setMode, thrownAnException, toString, traceGoal
 
Methods inherited from class aos.jack.jak.util.Watchable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface aos.apib.Base
getStreamer
 

Field Detail

message

public java.lang.String message
The trace string to display for this message. This is typically set within the posting methods of application events extending TracedMessageEvent.


ident

public java.lang.String ident
Message identification. This member is assigned when the message is sent to a unique identification of the message instance.


mid

public int mid
The message id number.


rmid

public int rmid
The message reply id number.


from

public transient java.lang.String from
The name of the sending agent.

Constructor Detail

MessageEvent

public MessageEvent()
Method Detail

getReply

public MessageEvent getReply()
Gets next reply from the message's reply queue.


replied

public Cursor replied()
Returns true when the message's reply queue is non-empty.


lostReply

public void lostReply(Agent a1,
                      java.lang.String a2)
Callback that is invoked when a reply arrives but the source has been discarded. By default it generates an warning. The method may be overridden.


traceReceived

public void traceReceived(Agent a1)
Callback that is invoked for the receiving agent when the message is received.


traceSent

public void traceSent(Agent a1)
Callback that is invoked for the sending agent when the message is sent.


JACK 5.4 Application Interface

Copyright (C) 1999-2008, Agent Oriented Software Pty. Ltd.

US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.


Agent Oriented Software Pty. Ltd.     http://www.aosgrp.com
PO Box 639, Carlton South, Victoria 3053, Australia
Phone: +61 3 9349 5055, Fax: +61 3 9349 5088