Magentix2  2.1.1
es.upv.dsic.gti_ia.norms.Normative_Protocol.QUERY_Method Class Reference
Inheritance diagram for es.upv.dsic.gti_ia.norms.Normative_Protocol.QUERY_Method:
Collaboration diagram for es.upv.dsic.gti_ia.norms.Normative_Protocol.QUERY_Method:

List of all members.

Public Member Functions

String run (CProcessor myProcessor, ACLMessage messageToSend)

Package Attributes

int n = 0

Detailed Description

Definition at line 118 of file Normative_Protocol.java.


Member Function Documentation

The method to be executed by the action state

Parameters:
myProcessorThe CProcessor of the conversation
Returns:
The name of the next state of the conversation

Implements es.upv.dsic.gti_ia.cAgents.SendStateMethod.

Definition at line 121 of file Normative_Protocol.java.

                                                                                    {

                        doQuery(myProcessor,messageToSend);
                        String state = "WAIT";

                        //Sends a message with rules.


                        messageToSend.setPerformative(ACLMessage.QUERY_REF);
                        messageToSend.setLanguage("AgentSpeak");
                        messageToSend.setSender(myProcessor.getMyAgent().getAid());
                        messageToSend.setReceiver(new AgentID(jasonAgentName));
                        messageToSend.setReplyWith(myProcessor.getConversationID());


                        

                        try {
                                messageToSend.setContentObject(messageContent);
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        }
                        //messageToSend.setContent("allocateRole(participant, virtual,_,AgentName)");


                        System.out.println("Voy a enviar un mensaje al agente Jason");


                        return state;
                }

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables