Package it.unito.di.artifact

Examples of it.unito.di.artifact.RoleId


 
  @OPERATION
  public void cfp(Task task, RoleId initiator) {
   
     CAMessage cfp = new CAMessage();
     RoleId dest = new RoleId(PARTICIPANT_ROLE, RoleId.GENERIC_ROLE);
    cfp.setContent(task);
    cfp.setRoleSender(initiator);
    cfp.setRoleReceiver(dest);
    cfp.setPerformative(ACLMessage.CFP);
    send(cfp);
View Full Code Here


 
  @OPERATION
  public void accept(Proposal proposal, RoleId initiator) {
   
    CAMessage accept = new CAMessage();
     RoleId dest = proposal.getRoleId();
     accept.setRoleSender(initiator);
     accept.setRoleReceiver(dest);
     accept.setPerformative(ACLMessage.ACCEPT_PROPOSAL);
    send(accept);
   
View Full Code Here

 
  @OPERATION
  public void reject(Proposal proposal, RoleId initiator) {
   
    CAMessage reject = new CAMessage();
     RoleId dest = proposal.getRoleId();
     reject.setRoleSender(initiator);
     reject.setRoleReceiver(dest);
     reject.setPerformative(ACLMessage.REJECT_PROPOSAL);
    send(reject);
   
View Full Code Here

     proposal.setRoleReceiver(initiator);
     proposal.setPerformative(ACLMessage.PROPOSE);
    send(proposal);
   
    try {
      createCommitment(new Commitment(participant, new RoleId(INITIATOR_ROLE, RoleId.GENERIC_ROLE), "accept", new CompositeExpression(
          LogicalOperatorType.OR, new Fact("done"), new Fact("failure"))));
      assertFact(new Fact("propose", participant, prop));
      logger.trace("OPERATION PERFORMED: PROPOSE by "+participant);
    } catch (MissingOperandException e) {
      // TODO Auto-generated catch block
View Full Code Here

  }
 
 
  // Useful constructors for commitment requirements
  public Commitment(String d, String c, String o) {
    this(new RoleId(d, RoleId.GENERIC_ROLE), new RoleId(c, RoleId.GENERIC_ROLE), o);
  }
View Full Code Here

  public Commitment(String d, String c, String o) {
    this(new RoleId(d, RoleId.GENERIC_ROLE), new RoleId(c, RoleId.GENERIC_ROLE), o);
  }
 
  public Commitment(String d, String c, String ant, String cons) {
    this(new RoleId(d, RoleId.GENERIC_ROLE), new RoleId(c, RoleId.GENERIC_ROLE), ant, cons);
  }
View Full Code Here

  public Commitment(String d, String c, String ant, String cons) {
    this(new RoleId(d, RoleId.GENERIC_ROLE), new RoleId(c, RoleId.GENERIC_ROLE), ant, cons);
  }
 
  public Commitment(String d, String c, String ant, SocialStateElement cons) {
    this(new RoleId(d, RoleId.GENERIC_ROLE), new RoleId(c, RoleId.GENERIC_ROLE), ant, cons);
  }
View Full Code Here

  public Commitment(String d, String c, String ant, SocialStateElement cons) {
    this(new RoleId(d, RoleId.GENERIC_ROLE), new RoleId(c, RoleId.GENERIC_ROLE), ant, cons);
  }
 
  public Commitment(String d, String c, SocialStateElement ant,  String cons) {
    this(new RoleId(d, RoleId.GENERIC_ROLE), new RoleId(c, RoleId.GENERIC_ROLE), ant, cons);
  }
View Full Code Here

 
  @OPERATION
  public void cfp(Task task, RoleId initiator) {
   
     CAMessage cfp = new CAMessage();
     RoleId dest = new RoleId(PARTICIPANT_ROLE, RoleId.GENERIC_ROLE);
    cfp.setContents(task);
    cfp.setRoleSender(initiator);
    cfp.setRoleReceiver(dest);
    cfp.setPerformative(ACLMessage.CFP);
    send(cfp);
View Full Code Here

 
  @OPERATION
  public void accept(Proposal proposal, RoleId initiator) {
   
    CAMessage accept = new CAMessage();
     RoleId dest = proposal.getRoleId();
     accept.setRoleSender(initiator);
     accept.setRoleReceiver(dest);
     accept.setPerformative(ACLMessage.ACCEPT_PROPOSAL);
    send(accept);
   
View Full Code Here

TOP

Related Classes of it.unito.di.artifact.RoleId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.