Class CNPReceiverPlan


  • public class CNPReceiverPlan
    extends AbstractReceiverPlan
    Receive a contract net protocol (cnp) and answer it.
    • Constructor Detail

      • CNPReceiverPlan

        public CNPReceiverPlan()
    • Method Detail

      • body

        public void body()
        The body method is called on the instantiated plan instance from the scheduler.
        Overrides:
        body in class AbstractReceiverPlan
      • isIterated

        protected boolean isIterated()
        Test if it is the iterated contract-net version.
        Returns:
        True, if is is the iterated version.
      • getShortProtocolName

        protected java.lang.String getShortProtocolName()
        Get protocol abbrev name.
        Returns:
        The protocol abbrev name.
      • makeProposal

        public java.lang.Object[] makeProposal​(java.lang.Object cfp,
                                               IComponentIdentifier initiator)
        Make a proposal based on the task description.
        Parameters:
        cfp - The cfp including the task to execute.
        Returns:
        The proposal for executing the task.
      • executeTask

        public java.lang.Object executeTask​(java.lang.Object proposal,
                                            java.lang.Object proposal_info,
                                            IComponentIdentifier initiator)
        Execute the task.
        Parameters:
        proposal - The proposal.
        proposal_info - The proposal info.
        Returns:
        The result of the task.