es.upv.dsic.gti_ia.cAgents.protocols
Class CommitmentStore_Protocol

java.lang.Object
  extended by es.upv.dsic.gti_ia.cAgents.protocols.CommitmentStore_Protocol

public abstract class CommitmentStore_Protocol
extends Object

Abstract class that defines the protocol that the Commitment Store follows to attend the petitions of the agents.

Author:
Jaume Jordan

Constructor Summary
CommitmentStore_Protocol()
           
 
Method Summary
protected  void doBegin(CProcessor myProcessor, ACLMessage msg)
          Begin method executed to begin the conversation
protected abstract  void doDie(CProcessor myProcessor)
          Actions to perform when the DIE message is received.
protected abstract  ACLMessage doRespond(CProcessor myProcessor, ACLMessage msgReceived)
          Creates a response depending on the petition received previously in the ACLMessage parameter
 CFactory newFactory(String name, int availableConversations, CAgent myAgent)
          Creates a new commitment store protocol CFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommitmentStore_Protocol

public CommitmentStore_Protocol()
Method Detail

doBegin

protected void doBegin(CProcessor myProcessor,
                       ACLMessage msg)
Begin method executed to begin the conversation

Parameters:
myProcessor - CProcessor that manage the conversation
msg - initial message

doRespond

protected abstract ACLMessage doRespond(CProcessor myProcessor,
                                        ACLMessage msgReceived)
Creates a response depending on the petition received previously in the ACLMessage parameter

Parameters:
myProcessor - CProcessor that manage the conversation
msgReceived - ACLMessage received as a petition by other agent
Returns:
ACLMessage with the response to give or null if it is not necessary to respond

doDie

protected abstract void doDie(CProcessor myProcessor)
Actions to perform when the DIE message is received.

Parameters:
myProcessor - CProcessor that manage the conversation

newFactory

public CFactory newFactory(String name,
                           int availableConversations,
                           CAgent myAgent)
Creates a new commitment store protocol CFactory

Parameters:
name - factory's name
availableConversations - maximum number of conversation this CFactory can manage simultaneously
myAgent - agent owner of this CFactory
Returns:
a new commitment store protocol factory


Copyright © 2012 GTI-IA. All Rights Reserved.