moses.controller
Class Law

java.lang.Object
  |
  +--moses.controller.Law

public class Law
extends java.lang.Object

The Law class is the root of all java law classes. Each java law implementation should extend this class, directly or indirectly. A law, in general, provides the following members:

  • events: implemented by event methods
  • primitive operations: implemented by the doOperations
  • environment variables: represented by member fields of this class
  • Any law extending this class should override, by convention, any or all of the event methods described below. The member field variables are always initialized prior to any call to a event method. If a particular law chooses to modify the value of any of the environment variables (although not recommended), the modification will only be temporary, with no persistence between event invocations.

    In order to prevent the transport of state between consecutive event invocations, no law class is allowed to declare any additional field member variables. This rule is enforced through reflection mechanism whenever a law class is loaded.

    Event methods are not invoked directly by the user programmer. They are invoked by the controller when it detects specific events. Sometimes the event methods overlap in scope (i.e. an event at the controller can map to more than one method). In this case, there are resolution methods that specify what event method is executed. These resolution specifications are described together with the method description.

    The primitive operation methods are not carried out at the moment of invocation. They are merely packed into a list of operations that are carried out at after the event method has returned.


    Field Summary
     moses.controlState.Term AList
              Removed and Appended Term List.
     long Clock
              "Clock" environment variable
     moses.controlState.Term CS
              Control State and Distinguished Control State Terms.
     moses.controlState.Term DCS
              Control State and Distinguished Control State Terms.
     java.util.Vector doList
              This variable holds the list of do operation as resulted after evaluation of each event.
     moses.message.Message Msg
              Environment variables.
     java.lang.String Peer
               
     java.lang.String PeerHash
               
     moses.controlState.Term RList
              Removed and Appended Term List.
     java.lang.String Self
               
     java.lang.String[] SubjectHash
               
     java.lang.String ThisLawHash
               
     java.lang.String ThisLawName
               
     
    Constructor Summary
    Law()
               
     
    Method Summary
     void adopted(java.lang.String arg)
              Adopted event.
     void adopted(java.lang.String arg, java.lang.String[] issuer, java.lang.String[] subject, java.lang.String[] attributes)
              Adopted event.
     void arrived(java.lang.String source, byte[] message, java.lang.String dest)
              Arrived event.
     void arrived(java.lang.String source, moses.message.Message message, java.lang.String dest)
              Arrived event.
     void arrived(java.lang.String source, java.lang.Object message, java.lang.String dest)
              Arrived event.
     void arrived(java.lang.String source, java.lang.String sourcelaw, byte[] message, java.lang.String dest)
              Arrived event.
     void arrived(java.lang.String source, java.lang.String sourcelaw, moses.message.Message message, java.lang.String dest)
              Arrived event.
     void arrived(java.lang.String source, java.lang.String sourcelaw, java.lang.Object message, java.lang.String dest)
              Arrived event.
     void arrived(java.lang.String source, java.lang.String message, java.lang.String dest)
              Arrived event.
     void arrived(java.lang.String source, java.lang.String sourcelaw, java.lang.String message, java.lang.String dest)
              Arrived event.
     void certified(java.lang.String source, java.lang.String issuer, java.lang.String subject, java.lang.String attributes)
              Certified event.
     void created(java.lang.String creator, java.lang.String claw, java.lang.String arg)
              Created event.
     void disconnected()
              This event is triggered when an agent disconnects from its controller.
     void doAdd(java.lang.String st)
              Control State primitive operation.
     void doAdd(moses.controlState.Term t)
              Control State primitive operation.
     void doAddAuthority(java.lang.String name, java.lang.String ref)
              Authority Table primitive operation.
     void doAddAuthorityH(java.lang.String name, java.lang.String hash)
              Authority Table primitive operation.
     void doAddAuthorityU(java.lang.String name, java.lang.String url)
              Authority Table primitive operation.
     void doAddCS(java.lang.String st)
              Control State primitive operation.
     void doAddCS(moses.controlState.Term t)
              Control State primitive operation.
     void doAddPortal(java.lang.String name, java.lang.String ref)
              Portal Table primitive operation.
     void doAddPortalH(java.lang.String name, java.lang.String hash)
              Portal Table primitive operation.
     void doAddPortalHA(java.lang.String name, java.lang.String hash, java.lang.String authority)
              Portal Table primitive operation.
     void doAddPortalU(java.lang.String name, java.lang.String url)
              Portal Table primitive operation.
     void doAddPortalUA(java.lang.String name, java.lang.String url, java.lang.String authority)
              Portal Table primitive operation.
     void doCreate(java.lang.String name, java.lang.String controllerHome, java.lang.String lname, java.lang.String arg)
              Reflexive-agent primitive operation.
     void doCreate(java.lang.String name, java.lang.String pwd, java.lang.String controllerHome, java.lang.String lname, java.lang.String arg)
              Reflexive-agent primitive operation.
     void doCreateFP()
              Control State primitive operation.
     void doDecr(java.lang.String st, int d)
              Control State primitive operation.
     void doDecr(moses.controlState.Term t, int d)
              Control State primitive operation.
     void doDelAuthority(java.lang.String name)
              Authority Table primitive operation.
     void doDeliver()
              Deliver primitive operation.
     void doDeliver(moses.message.Message message)
              Deliver primitive operation.
     void doDeliver(java.lang.String source, byte[] message, java.lang.String dest)
              Deliver primitive operation.
     void doDeliver(java.lang.String source, moses.message.Message message, java.lang.String dest)
              Deliver primitive operation.
     void doDeliver(java.lang.String source, java.lang.Object message, java.lang.String dest)
              Deliver primitive operation.
     void doDeliver(java.lang.String source, java.lang.String lname, byte[] message, java.lang.String dest)
              Deliver primitive operation.
     void doDeliver(java.lang.String source, java.lang.String lname, moses.message.Message message, java.lang.String dest)
              Deliver primitive operation, with Message data type.
     void doDeliver(java.lang.String source, java.lang.String lname, java.lang.Object message, java.lang.String dest)
              Deliver primitive operation.
     void doDeliver(java.lang.String source, java.lang.String message, java.lang.String dest)
              Deliver primitive operation.
     void doDeliver(java.lang.String source, java.lang.String lname, java.lang.String message, java.lang.String dest)
              Deliver primitive operation.
     void doDelPortal(java.lang.String name)
              Portal Table primitive operation.
     void doDiscloseAllCS()
              Control State primitive operation.
     void doDiscloseCS(java.lang.String st)
              Control State primitive operation.
     void doDiscloseCS(moses.controlState.Term t)
              Control State primitive operation.
     void doDiscloseLaw()
              Control State primitive operation.
     void doEnterTest()
              Test and help primitive operation.
     void doExitTest()
              Test and help primitive operation.
     void doForward()
              Forward primitive operation.
     void doForward(moses.message.Message message)
              Forward primitive operation.
     void doForward(java.lang.String source, byte[] message, java.lang.String dest)
              Forward primitive operation.
     void doForward(java.lang.String source, byte[] message, java.lang.String dest, java.lang.String lname)
              Forward primitive operation.
     void doForward(java.lang.String source, moses.message.Message message, java.lang.String dest)
              Forward primitive operation.
     void doForward(java.lang.String source, moses.message.Message message, java.lang.String dest, java.lang.String lname)
              Forward primitive operation.
     void doForward(java.lang.String source, java.lang.Object message, java.lang.String dest)
              Forward primitive operation.
     void doForward(java.lang.String source, java.lang.Object message, java.lang.String dest, java.lang.String lname)
              Forward primitive operation.
     void doForward(java.lang.String source, java.lang.String message, java.lang.String dest)
              Forward primitive operation.
     void doForward(java.lang.String source, java.lang.String message, java.lang.String dest, java.lang.String lname)
              Forward primitive operation.
     void doImposeObligation(java.lang.String st, int dt)
              Obligation primitive operation.
     void doImposeObligation(java.lang.String st, int dt, java.lang.String units)
              Obligation primitive operation.
     void doImposeObligation(moses.controlState.Term t, int dt)
              Obligation primitive operation.
     void doImposeObligation(moses.controlState.Term t, int dt, java.lang.String units)
              Obligation primitive operation.
     void doImposeStateObligation(java.lang.String st)
              Auditing primitive operation.
     void doImposeStateObligation(moses.controlState.Term t)
              Auditing primitive operation.
     void doImposeStateObligationAll()
              Auditing primitive operation.
     void doIncr(java.lang.String st, int d)
              Control State primitive operation.It increments the term from the Control State that matches exactly the first argument with the second one.
     void doIncr(moses.controlState.Term t, int d)
              Control State primitive operation.
     void doMulticast(java.lang.String[] destinations, java.lang.String[] laws)
              Multicast primitive operation.
     void doMulticast(java.lang.String source, byte[] message, java.lang.String[] destinations)
              Multicast primitive operation.
     void doMulticast(java.lang.String source, byte[] message, java.lang.String[] destinations, java.lang.String[] laws)
              Multicast primitive operation.
     void doMulticast(java.lang.String source, moses.message.Message message, java.lang.String[] destinations)
              Multicast primitive operation.
     void doMulticast(java.lang.String source, moses.message.Message message, java.lang.String[] destinations, java.lang.String[] laws)
              Multicast primitive operation.
     void doMulticast(java.lang.String source, java.lang.Object message, java.lang.String[] destinations)
              Multicast primitive operation.
     void doMulticast(java.lang.String source, java.lang.Object message, java.lang.String[] destinations, java.lang.String[] laws)
              Multicast primitive operation.
     void doMulticast(java.lang.String source, java.lang.String message, java.lang.String[] destinations)
              Multicast primitive operation.
     void doMulticast(java.lang.String source, java.lang.String message, java.lang.String[] destinations, java.lang.String[] laws)
              Multicast primitive operation.
     void doQuit()
              Agent primitive operation.
     void doRelease(moses.message.Message message)
              Release primitive operation.
     void doRelease(java.lang.String source, byte[] message, java.lang.String dest, int port)
              Release primitive operation.
     void doRelease(java.lang.String source, moses.message.Message message, java.lang.String dest, int port)
              Release primitive operation.
     void doRelease(java.lang.String source, java.lang.Object message, java.lang.String dest, int port)
              Release primitive operation.
     void doRelease(java.lang.String source, java.lang.String message, java.lang.String dest, int port)
              Release primitive operation.
     void doRemove(java.lang.String st)
              Control State primitive operation.
     void doRemove(moses.controlState.Term t)
              Control State primitive operation.
     void doRepealObligation(java.lang.String st)
              Obligation primitive operation.
     void doRepealObligation(moses.controlState.Term t)
              Obligation primitive operation.
     void doRepealStateObligation(java.lang.String st)
              Auditing primitive operation.
     void doRepealStateObligation(moses.controlState.Term t)
              Auditing primitive operation.
     void doRepealStateObligationAll()
              Auditing primitive operation.
     void doReplace(java.lang.String soldt, java.lang.String snewt)
              Control State primitive operation.
     void doReplace(moses.controlState.Term oldt, moses.controlState.Term newt)
              Control State primitive operation.
     void doReplaceCS(java.lang.String st)
              Control State primitive operation.
     void doReplaceCS(moses.controlState.Term t)
              Control State primitive operation.
     void doSetPassword(java.lang.String pwd)
              Agent primitive operation.
     void doShowEvents(java.lang.String evlist, java.lang.String cslist)
              Test and help primitive operation.
     void doShowEvents(moses.controlState.Term evlist, moses.controlState.Term cslist)
              Test and help primitive operation.
     void exception(moses.message.Message m, java.lang.String failurecause)
              Exception event.
     void exception(java.lang.String source, byte[] message, java.lang.String dest, int port, java.lang.String failurecause)
              Exception event.
     void exception(java.lang.String source, byte[] message, java.lang.String dest, java.lang.String law, java.lang.String failurecause)
              Exception event.
     void exception(java.lang.String source, java.lang.Object message, java.lang.String dest, int port, java.lang.String failurecause)
              Exception event.
     void exception(java.lang.String source, java.lang.Object message, java.lang.String dest, java.lang.String law, java.lang.String failurecause)
              Exception event.
     void exception(java.lang.String source, java.lang.String message, java.lang.String dest, int port, java.lang.String failurecause)
              Exception event.
     void exception(java.lang.String name, java.lang.String chost, java.lang.String arg, java.lang.String failurecause)
              Exception event.
     void exception(java.lang.String source, java.lang.String message, java.lang.String dest, java.lang.String law, java.lang.String failurecause)
              Exception event.
     void obligationDue(moses.controlState.Term type)
              This event is triggered when an obligation imposed on this agent becomes due.
     void reconnected()
              This event is triggered when an agent reconnects to a controller after some off-line period.
     void sent(java.lang.String source, byte[] message, java.lang.String dest)
              Sent event.
     void sent(java.lang.String source, byte[] message, java.lang.String dest, java.lang.String destlaw)
              Sent event.
     void sent(java.lang.String source, moses.message.Message message, java.lang.String dest)
              Sent event.
     void sent(java.lang.String source, moses.message.Message message, java.lang.String dest, java.lang.String destlaw)
              Sent event.
     void sent(java.lang.String source, java.lang.Object message, java.lang.String dest)
              Sent event.
     void sent(java.lang.String source, java.lang.Object message, java.lang.String dest, java.lang.String destlaw)
              Sent event.
     void sent(java.lang.String source, java.lang.String message, java.lang.String dest)
              Sent event.
     void sent(java.lang.String source, java.lang.String message, java.lang.String dest, java.lang.String destlaw)
              Sent event.
     void stateChanged()
              This event is triggered when an audited term in the control state is modified as a result of a previous primitive operation affecting the state.
     void submitted(java.lang.String source, int port, byte[] message, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, byte[] message, java.lang.String pwd, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, byte[] message, java.lang.String issuer, java.lang.String subject, java.lang.String attributes, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, moses.message.Message message, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, moses.message.Message message, java.lang.String pwd, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, moses.message.Message message, java.lang.String issuer, java.lang.String subject, java.lang.String attributes, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, java.lang.Object message, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, java.lang.Object message, java.lang.String pwd, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, java.lang.Object message, java.lang.String issuer, java.lang.String subject, java.lang.String attributes, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, java.lang.String message, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, java.lang.String message, java.lang.String pwd, java.lang.String dest)
              Submitted event.
     void submitted(java.lang.String source, int port, java.lang.String message, java.lang.String issuer, java.lang.String subject, java.lang.String attributes, java.lang.String dest)
              Submitted event.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    CS

    public moses.controlState.Term CS
    Control State and Distinguished Control State Terms. The information they store has to be accessed using the Term (and related) API. Any direct modification will be volatile, it will only live during the scope of the event call. Modifications should only be performed through one of the "doOperation" functions.


    DCS

    public moses.controlState.Term DCS
    Control State and Distinguished Control State Terms. The information they store has to be accessed using the Term (and related) API. Any direct modification will be volatile, it will only live during the scope of the event call. Modifications should only be performed through one of the "doOperation" functions.


    RList

    public moses.controlState.Term RList
    Removed and Appended Term List. These terms are only significant in the context of a "stateChanged" event. In any other case, the value of these fields is unspecified. When specified, the Rlist holds all the terms marked as audited (see doAudit) and that have been deleted by a previous do operation. The Alist holds all the terms marked as audited and which have been appended by a previous do operation.


    AList

    public moses.controlState.Term AList
    Removed and Appended Term List. These terms are only significant in the context of a "stateChanged" event. In any other case, the value of these fields is unspecified. When specified, the Rlist holds all the terms marked as audited (see doAudit) and that have been deleted by a previous do operation. The Alist holds all the terms marked as audited and which have been appended by a previous do operation.


    Msg

    public moses.message.Message Msg
    Environment variables. Their value is specified in the case of certain communication events (see Moses specs for details).


    Self

    public java.lang.String Self

    Peer

    public java.lang.String Peer

    PeerHash

    public java.lang.String PeerHash

    SubjectHash

    public java.lang.String[] SubjectHash

    ThisLawName

    public java.lang.String ThisLawName

    ThisLawHash

    public java.lang.String ThisLawHash

    Clock

    public long Clock
    "Clock" environment variable


    doList

    public java.util.Vector doList
    This variable holds the list of do operation as resulted after evaluation of each event. This variable should not be modified directly. Its value is changed by each of the "doOperation" methods.

    Constructor Detail

    Law

    public Law()
    Method Detail

    adopted

    public void adopted(java.lang.String arg)
    Adopted event. This method is triggered when a agent is newly adopted under this law. If the other adopted method is overridden by the extending law (adopted(String arg, String[] issuer, String[] subject, String[] attributes) ), then the latter method is always invoked, and this method is ignored. See also Member.adopt().

    Parameters:
    arg - represents the argument supplied as part of the adoption message.
    See Also:
    Member.adopt(String, String)

    adopted

    public void adopted(java.lang.String arg,
                        java.lang.String[] issuer,
                        java.lang.String[] subject,
                        java.lang.String[] attributes)
    Adopted event. This method is triggered when a agent is newly adopted under this law. The coding of this method in the law allows the law to provide control based on the certificates (or self certificates) possibly submitted during the agent adoption. If this method is implemented in the extending law, then this method is always invoked and the short adopted method (adopted(String arg)) is ignored. For more information, see also Member.adopt().

    Parameters:
    arg - represents the argument supplied as part of the adoption message .
    issuer - represents the authority table name of the issuer of this certificate.
    subject - represents the authority table name of the subject of this certificate (or the agent name in the case of a self certificate ).
    attributes - represents the attributes of the certificate.
    See Also:
    Member.adopt(String, String).

    created

    public void created(java.lang.String creator,
                        java.lang.String claw,
                        java.lang.String arg)
    Created event. It is triggered when an agent is newly created as a result of a successful execution of a doCreate primitive.

    Parameters:
    creator - represents the name of the agent that executed the doCreate primitive
    claw - represents the law of the creator according to this law portal.
    arg - represents a customary argument supplied as part of the doCreate primitive.
    See Also:
    doCreate(String name, String controllerHome, String lname, String arg)

    disconnected

    public void disconnected()
    This event is triggered when an agent disconnects from its controller. It is common to place a doQuit primitive in this method.


    reconnected

    public void reconnected()
    This event is triggered when an agent reconnects to a controller after some off-line period.


    obligationDue

    public void obligationDue(moses.controlState.Term type)
    This event is triggered when an obligation imposed on this agent becomes due.

    Parameters:
    type - argument represents the type of the due obligation.
    See Also:
    doImposeObligation(Term t, int dt)

    stateChanged

    public void stateChanged()
    This event is triggered when an audited term in the control state is modified as a result of a previous primitive operation affecting the state. Whenever this method is invoked, the RList and AList field variables reflect the changes that affected the control state.

    See Also:
    doImposeStateObligation(Term t)

    certified

    public void certified(java.lang.String source,
                          java.lang.String issuer,
                          java.lang.String subject,
                          java.lang.String attributes)
    Certified event. It is triggered when an agent sends a certificate type message to its controller (see Member.sendCertificate() and Member.sendSelfCertificate() methods).

    Parameters:
    source - represent the source of the message (this agent full name).
    issuer - represents the name of the issuer according to this Authority table.
    subject - represents the name of the subject according to the certificate (the Authority Table name corresponding to the public key of the subject); if this is a self certificate, then this field will be the name of this agent (agent.equals(subject)).
    See Also:
    Member.sendCertificate(LGICert cert)

    sent

    public void sent(java.lang.String source,
                     java.lang.String message,
                     java.lang.String dest)
    Sent event. It is triggered when an agent sends a message (see also Member.send_lg() methods). There are two types of send methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages submitted for a destination under the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message is submitted for the same law, an attempt is made to invoke the simpler (three argument) method. If no appropriate method is found, or the message had been issued for a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.
    This simplified event method is invoked only when the law of the destination is the same as the law of this agent.

    Parameters:
    source - represents the source of this message
    message - represents the message itself.

    sent

    public void sent(java.lang.String source,
                     java.lang.Object message,
                     java.lang.String dest)
    Sent event. It is triggered when an agent sends a message (see also Member.send_lg() methods). There are two types of send methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages submitted for a destination under the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message is submitted for the same law, an attempt is made to invoke the simpler (three argument) method. If no appropriate method is found, or the message had been issued for a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.
    This simplified event method is invoked only when the law of the destination is the same as the law of this agent.

    Parameters:
    source - represents the source of this message
    message - represents the message itself.

    sent

    public void sent(java.lang.String source,
                     byte[] message,
                     java.lang.String dest)
    Sent event. It is triggered when an agent sends a message (see also Member.send_lg() methods). There are two types of send methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages submitted for a destination under the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message is submitted for the same law, an attempt is made to invoke the simpler (three argument) method. If no appropriate method is found, or the message had been issued for a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.
    This simplified event method is invoked only when the law of the destination is the same as the law of this agent.

    Parameters:
    source - represents the source of this message
    message - represents the message itself.

    sent

    public void sent(java.lang.String source,
                     moses.message.Message message,
                     java.lang.String dest)
    Sent event. It is triggered when an agent sends a message (see also Member.send_lg() methods). There are two types of send methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages submitted for a destination under the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message is submitted for the same law, an attempt is made to invoke the simpler (three argument) method. If no appropriate method is found, or the message had been issued for a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.
    This simplified event method is invoked only when the law of the destination is the same as the law of this agent.

    Parameters:
    source - represents the source of this message
    message - represents the message itself.

    sent

    public void sent(java.lang.String source,
                     java.lang.String message,
                     java.lang.String dest,
                     java.lang.String destlaw)
    Sent event. It is triggered when an agent sends a message (see also Member.send_lg() methods). There are two types of send methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages submitted for a destination under the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message is submitted for the same law, an attempt is made to invoke the simpler (three argument) method. If no appropriate method is found, or the message had been issued for a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.

    Parameters:
    source - represents the source of this message
    destlaw - represents the name of the law the destination
    message - represents the message itself.

    sent

    public void sent(java.lang.String source,
                     java.lang.Object message,
                     java.lang.String dest,
                     java.lang.String destlaw)
    Sent event. It is triggered when an agent sends a message (see also Member.send_lg() methods). There are two types of send methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages submitted for a destination under the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message is submitted for the same law, an attempt is made to invoke the simpler (three argument) method. If no appropriate method is found, or the message had been issued for a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.

    Parameters:
    source - represents the source of this message
    destlaw - represents the name of the law the destination
    message - represents the message itself.

    sent

    public void sent(java.lang.String source,
                     byte[] message,
                     java.lang.String dest,
                     java.lang.String destlaw)
    Sent event. It is triggered when an agent sends a message (see also Member.send_lg() methods). There are two types of send methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages submitted for a destination under the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message is submitted for the same law, an attempt is made to invoke the simpler (three argument) method. If no appropriate method is found, or the message had been issued for a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.

    Parameters:
    source - represents the source of this message
    destlaw - represents the name of the law the destination
    message - represents the message itself.

    sent

    public void sent(java.lang.String source,
                     moses.message.Message message,
                     java.lang.String dest,
                     java.lang.String destlaw)
    Sent event. It is triggered when an agent sends a message (see also Member.send_lg() methods). There are two types of send methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages submitted for a destination under the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message is submitted for the same law, an attempt is made to invoke the simpler (three argument) method. If no appropriate method is found, or the message had been issued for a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.

    Parameters:
    source - represents the source of this message
    destlaw - represents the name of the law the destination
    message - represents the message itself.

    arrived

    public void arrived(java.lang.String source,
                        java.lang.String message,
                        java.lang.String dest)
    Arrived event. It is triggered when a message arrives at the controller on behalf of this agent (see doForward operations).
    There are two types of arrived methods a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages coming from the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message comes from the same law, an attempt is made to invoke a simpler (three argument) method. If no appropriate method is found, or the message had been issued by a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.
    This simplified event method is invoked only when the source of the message is operating under the same law as this agent.

    Parameters:
    source - represents the source of this message.
    message - represents the message itself.

    arrived

    public void arrived(java.lang.String source,
                        java.lang.Object message,
                        java.lang.String dest)
    Arrived event. It is triggered when a message arrives at the controller on behalf of this agent (see doForward operations).
    There are two types of arrived methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages coming from the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message comes from the same law, an attempt is made to invoke a simpler (three argument) method. If no appropriate method is found, or the message had been issued by a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.
    This simplified event method is invoked only when the source of the message is operating under the same law as this agent.

    Parameters:
    source - represents the source of this message.
    message - represents the message itself.

    arrived

    public void arrived(java.lang.String source,
                        byte[] message,
                        java.lang.String dest)
    Arrived event. It is triggered when a message arrives at the controller on behalf of this agent (see doForward operations).
    There are two types of arrived methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages coming from the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message comes from the same law, an attempt is made to invoke a simpler (three argument) method. If no appropriate method is found, or the message had been issued by a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.
    This simplified event method is invoked only when the source of the message is operating under the same law as this agent.

    Parameters:
    source - represents the source of this message.
    message - represents the message itself.

    arrived

    public void arrived(java.lang.String source,
                        moses.message.Message message,
                        java.lang.String dest)
    Arrived event. It is triggered when a message arrives at the controller on behalf of this agent (see doForward operations).
    There are two types of arrived methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages coming from the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message comes from the same law, an attempt is made to invoke a simpler (three argument) method. If no appropriate method is found, or the message had been issued by a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.
    This simplified event method is invoked only when the source of the message is operating under the same law as this agent.

    Parameters:
    source - represents the source of this message.
    message - represents the message itself.

    arrived

    public void arrived(java.lang.String source,
                        java.lang.String sourcelaw,
                        java.lang.String message,
                        java.lang.String dest)
    Arrived event. It is triggered when a message arrives at the controller on behalf of this agent (see doForward operations).
    There are two types of arrived methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages coming from the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message comes from the same law, an attempt is made to invoke a simpler (three argument) method. If no appropriate method is found, or the message had been issued by a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.

    Parameters:
    source - represents the source of this message.
    message - represents the message itself.

    arrived

    public void arrived(java.lang.String source,
                        java.lang.String sourcelaw,
                        java.lang.Object message,
                        java.lang.String dest)
    Arrived event. It is triggered when a message arrives at the controller on behalf of this agent (see doForward operations).
    There are two types of arrived methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages coming from the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message comes from the same law, an attempt is made to invoke a simpler (three argument) method. If no appropriate method is found, or the message had been issued by a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.

    Parameters:
    source - represents the source of this message.
    sourcelaw - represents the name of the law the source.
    message - represents the message itself.

    arrived

    public void arrived(java.lang.String source,
                        java.lang.String sourcelaw,
                        byte[] message,
                        java.lang.String dest)
    Arrived event. It is triggered when a message arrives at the controller on behalf of this agent (see doForward operations).
    There are two types of arrived methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages coming from the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message comes from the same law, an attempt is made to invoke a simpler (three argument) method. If no appropriate method is found, or the message had been issued by a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.

    Parameters:
    source - represents the source of this message.
    sourcelaw - represents the name of the law the source.
    message - represents the message itself.

    arrived

    public void arrived(java.lang.String source,
                        java.lang.String sourcelaw,
                        moses.message.Message message,
                        java.lang.String dest)
    Arrived event. It is triggered when a message arrives at the controller on behalf of this agent (see doForward operations).
    There are two types of arrived methods: a more general one and a simpler one. The more general type exposes the name of the source law as one of its arguments. A simpler version, triggered only for messages coming from the same law, does not expose the name of the law. Each of these methods are overloaded with different data types for the payload of the message: String, Object or byte[] data types; a generic moses.message.Message data type is also provided. The resolution of the methods is as follows: if the message comes from the same law, an attempt is made to invoke a simpler (three argument) method. If no appropriate method is found, or the message had been issued by a different law, then the general (four argument) method is invoked.
    Furthermore, the method is refined based on the argument type: if the extending law implements a method corresponding to the message payload, then that method is invoked. Otherwise the fall-back Message type method is invoked.

    Parameters:
    source - represents the source of this message.
    sourcelaw - represents the name of the law the source.
    message - represents the message itself.

    exception

    public void exception(java.lang.String source,
                          java.lang.String message,
                          java.lang.String dest,
                          java.lang.String law,
                          java.lang.String failurecause)
    Exception event. It is triggered when an exception occurs as a result of a communication-related primitive operation. This method is overloaded such that it can accommodate different types of exceptions. If the appropriate method corresponding to the exception is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the exceptions related to doForward operations.

    Parameters:
    failurecause - argument represents the cause of the failure for some primitive operation.
    source - represents the source of the faulty message.
    message - represents the payload of the message.
    law - represents the law of the original, faulty message.

    exception

    public void exception(java.lang.String source,
                          java.lang.Object message,
                          java.lang.String dest,
                          java.lang.String law,
                          java.lang.String failurecause)
    Exception event. It is triggered when an exception occurs as a result of a communication-related primitive operation. This method is overloaded such that it can accommodate different types of exceptions. If the appropriate method corresponding to the exception is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the exceptions related to doForward operations.

    Parameters:
    failurecause - argument represents the cause of the failure for some primitive operation.
    source - represents the source of the faulty message.
    message - represents the payload of the message.
    law - represents the law of the original, faulty message.

    exception

    public void exception(java.lang.String source,
                          byte[] message,
                          java.lang.String dest,
                          java.lang.String law,
                          java.lang.String failurecause)
    Exception event. It is triggered when an exception occurs as a result of a communication-related primitive operation. This method is overloaded such that it can accommodate different types of exceptions. If the appropriate method corresponding to the exception is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the exceptions related to doForward operations.

    Parameters:
    failurecause - argument represents the cause of the failure for some primitive operation.
    source - represents the source of the faulty message.
    message - represents the payload of the message.
    law - represents the law of the original, faulty message.

    exception

    public void exception(java.lang.String name,
                          java.lang.String chost,
                          java.lang.String arg,
                          java.lang.String failurecause)
    Exception event. It is triggered when an exception occurs as a result of a communication-related primitive operation. This method is overloaded such that it can accommodate different types of exceptions. If the appropriate method corresponding to the exception is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the exceptions related to doCreate operations.

    Parameters:
    failurecause - argument represents the cause of the failure for some primitive operation.
    name - represents the name of the agent to have been created.
    chost - represents the host name of the destination controller.
    arg - represents the arbitrary argument to the faulty creation operation.

    exception

    public void exception(java.lang.String source,
                          java.lang.String message,
                          java.lang.String dest,
                          int port,
                          java.lang.String failurecause)
    Exception event. It is triggered when an exception occurs as a result of a communication-related primitive operation. This method is overloaded such that it can accommodate different types of exceptions. If the appropriate method corresponding to the exception is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the exceptions related to doRelease operations.

    Parameters:
    failurecause - argument represents the cause of the failure for some primitive operation.
    source - represents the source of the faulty message.
    dest - represents the host name of the destination of the faulty message.
    port - represents the TCPIP port for the destination of the faulty message..
    message - represents the payload of the message.

    exception

    public void exception(java.lang.String source,
                          java.lang.Object message,
                          java.lang.String dest,
                          int port,
                          java.lang.String failurecause)
    Exception event. It is triggered when an exception occurs as a result of a communication-related primitive operation. This method is overloaded such that it can accommodate different types of exceptions. If the appropriate method corresponding to the exception is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the exceptions related to doRelease operations.

    Parameters:
    failurecause - argument represents the cause of the failure for some primitive operation.
    source - represents the source of the faulty message.
    dest - represents the host name of the destination of the faulty message.
    port - represents the TCPIP port for the destination of the faulty message..
    message - represents the payload of the message.

    exception

    public void exception(java.lang.String source,
                          byte[] message,
                          java.lang.String dest,
                          int port,
                          java.lang.String failurecause)
    Exception event. It is triggered when an exception occurs as a result of a communication-related primitive operation. This method is overloaded such that it can accommodate different types of exceptions. If the appropriate method corresponding to the exception is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the exceptions related to doRelease operations.

    Parameters:
    failurecause - argument represents the cause of the failure for some primitive operation.
    source - represents the source of the faulty message.
    dest - represents the host name of the destination of the faulty message.
    port - represents the TCPIP port for the destination of the faulty message..
    message - represents the payload of the message.

    exception

    public void exception(moses.message.Message m,
                          java.lang.String failurecause)
    Exception event. It is triggered when an exception occurs as a result of a communication-related primitive operation. This method is overloaded such that it can accommodate different types of exceptions. If the appropriate method corresponding to the exception is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the exceptions related to doRelease operations.

    Parameters:
    failurecause - argument represents the cause of the failure for some primitive operation.
    m - represents the Message corresponding to, or carrying, the faulty primitive operation.

    submitted

    public void submitted(java.lang.String source,
                          int port,
                          java.lang.String message,
                          java.lang.String dest)
    Submitted event. It is triggered when an external agent (see ExMember) has sent a message to this agent. Various overloaded versions of this method allow for different data types for the payload (message itself) and for three methods of authentication : none/password/certificate. If the appropriate method corresponding to the submitted event is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the submissions with no method of authentication.

    Parameters:
    source - represents the host name of the source of this message.
    port - represents the TCPIP port declared by the source of the message.
    message - represents the message itself.

    submitted

    public void submitted(java.lang.String source,
                          int port,
                          java.lang.Object message,
                          java.lang.String dest)
    Submitted event. It is triggered when an external agent (see ExMember) has sent a message to this agent. Various overloaded versions of this method allow for different data types for the payload (message itself) and for three methods of authentication : none/password/certificate. If the appropriate method corresponding to the submitted event is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the submissions with no method of authentication.

    Parameters:
    source - represents the host name of the source of this message.
    port - represents the TCPIP port declared by the source of the message.
    message - represents the message itself.

    submitted

    public void submitted(java.lang.String source,
                          int port,
                          byte[] message,
                          java.lang.String dest)
    Submitted event. It is triggered when an external agent (see ExMember) has sent a message to this agent. Various overloaded versions of this method allow for different data types for the payload (message itself) and for three methods of authentication : none/password/certificate. If the appropriate method corresponding to the submitted event is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the submissions with no method of authentication.

    Parameters:
    source - represents the host name of the source of this message.
    port - represents the TCPIP port declared by the source of the message.
    message - represents the message itself.

    submitted

    public void submitted(java.lang.String source,
                          int port,
                          moses.message.Message message,
                          java.lang.String dest)
    Submitted event. It is triggered when an external agent (see ExMember) has sent a message to this agent. Various overloaded versions of this method allow for different data types for the payload (message itself) and for three methods of authentication : none/password/certificate. If the appropriate method corresponding to the submitted event is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the submissions with no method of authentication.

    Parameters:
    source - represents the host name of the source of this message.
    port - represents the TCPIP port declared by the source of the message.
    message - represents the message itself.

    submitted

    public void submitted(java.lang.String source,
                          int port,
                          java.lang.String message,
                          java.lang.String pwd,
                          java.lang.String dest)
    Submitted event. It is triggered when an external agent (see ExMember) has sent a message to this agent. Various overloaded versions of this method allow for different data types for the payload (message itself) and for three methods of authentication : none/password/certificate. If the appropriate method corresponding to the submitted event is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the submissions with password authentication.

    Parameters:
    source - represents the host name of the source of this message.
    port - represents the TCPIP port declared by the source of the message.
    message - represents the message itself.

    submitted

    public void submitted(java.lang.String source,
                          int port,
                          java.lang.Object message,
                          java.lang.String pwd,
                          java.lang.String dest)
    Submitted event. It is triggered when an external agent (see ExMember) has sent a message to this agent. Various overloaded versions of this method allow for different data types for the payload (message itself) and for three methods of authentication : none/password/certificate. If the appropriate method corresponding to the submitted event is implemented in the extending law, then that method is invoked. If not, the fall back Message type method is invoked.

    This method handles the submissions with password authentication.

    Parameters:
    source - represents the host name of the source of this message.
    port - represents the TCPIP port declared by the source of the message.
    message - represents the message itself.

    submitted

    public void submitted(java.lang.String source,
                          int port,
                          byte[] message,
                          java.lang.String pwd,
                          java.lang.String dest)
    Submitted event. It is triggered when an external agent (see ExMember) has sent a message to this agent. Various overloaded versions of this method allow for different data types for the payload (message itself) and for three methods of authentication : none/password/certificate. If the appropriate method corresponding to the submitted event is implemented in the extending law, then that method is invoked. If not, the fall-back Message type method is invoked.

    This method handles the submissions with password authentication.

    Parameters:
    source - represents the host name of the source of this message.
    port - represents the TCPIP port declared by the source of the message.
    message - represents the message itself.

    submitted

    public void submitted(java.lang.String source,
                          i