def handle_request(self, message): FipaRequestProtocol.handle_request(self, message) display_message(self.agent.aid.name, message.content) resposta = message.create_reply() resposta.set_performative(ACLMessage.INFORM) resposta.set_content('Essa e sua resposta') self.agent.send(resposta)
def handle_subscribe(self, message): self.register(message.sender) display_message(self.agent.aid.name, message.content) resposta = message.create_reply() resposta.set_performative(ACLMessage.AGREE) resposta.set_content('Pedido de subscricao aceito') self.agent.send(resposta)
def handle_inform(self, message): FipaRequestProtocol.handle_inform(self, message) display_message(self.agent.aid.name, 'Resposta Recebida')
def handle_cancel(self, message): self.deregister(self, message.sender) display_message(self.agent.aid.name, message.content)
def handle_inform(self, message): display_message(self.agent.aid.name, message.content)