es.upv.dsic.gti_ia.architecture
Class MessageTemplate

java.lang.Object
  extended by es.upv.dsic.gti_ia.architecture.MessageTemplate

public class MessageTemplate
extends Object

The class messageTemplate creates a new template to compare messages.


Field Summary
static int ACCEPT_PROPOSAL
          constant identifying the FIPA performative *
static int AGREE
          constant identifying the FIPA performative *
static int CANCEL
          constant identifying the FIPA performative *
static int CFP
          constant identifying the FIPA performative *
static int CONFIRM
          constant identifying the FIPA performative *
static int DISCONFIRM
          constant identifying the FIPA performative *
static int FAILURE
          constant identifying the FIPA performative *
static int INFORM
          constant identifying the FIPA performative *
static int INFORM_IF
          constant identifying the FIPA performative *
static int INFORM_REF
          constant identifying the FIPA performative *
static int NOT_UNDERSTOOD
          constant identifying the FIPA performative *
static int PROPAGATE
          constant identifying the FIPA performative *
static int PROPOSE
          constant identifying the FIPA performative *
static int PROXY
          constant identifying the FIPA performative *
static int QUERY_IF
          constant identifying the FIPA performative *
static int QUERY_REF
          constant identifying the FIPA performative *
static int REFUSE
          constant identifying the FIPA performative *
static int REJECT_PROPOSAL
          constant identifying the FIPA performative *
static int REQUEST
          constant identifying the FIPA performative *
static int REQUEST_WHEN
          constant identifying the FIPA performative *
static int REQUEST_WHENEVER
          constant identifying the FIPA performative *
static int SUBSCRIBE
          constant identifying the FIPA performative *
static int UNKNOWN
          constant identifying an unknown performative *
 
Constructor Summary
MessageTemplate(String iprotocol)
          Creates a new MessageTemplate.
 
Method Summary
 int add_receiver(AgentID a)
          Adds a new receiver
 void addConversation(String conversacion)
          Adds new conversation id in the list of conversations
 boolean deleteAllConversation()
          Deletes all conversations in the list of conversations
 boolean deleteAllReceiver()
          Deletes all receivers in the list of receivers
 void deleteConversation(String conversation)
          Deletes a conversation id in the list of conversations
 boolean existReceiver(AgentID a)
          Indicates if a receiver exists in the list of receivers
 String getContent()
           
 String getConversationId()
           
 String getEncoding()
           
 String getInReplyTo()
           
 String getLanguage()
           
 ArrayList<String> getList_Conversation()
          Returns Conversations list
 String getOntology()
           
 String getPerformative()
           
 int getPerformativeInt()
           
 String getProtocol()
           
 ArrayList<AgentID> getReceiver_list()
          Returns Receiver list
 AgentID getReceiver()
           
 String getReplyBy()
           
 Date getReplyByDate()
           
 AgentID getReplyTo()
           
 String getReplyWith()
           
 AgentID getSender()
           
 void setContent(String cont)
           
 void setConversationId(String id)
           
 void setEncoding(String encoding)
           
 void setInReplyTo(String irt)
           
 void setLanguage(String lang)
           
 void setOntology(String ontology)
           
 void setPerformative(int performative)
          Sets a new performative
 void setPerformative(String performative)
          Sets a new performative
 void setProtocol(String protocol)
           
 void setReceiver_list(ArrayList<AgentID> receiver_list)
          Sets a new receiver list
 void setReceiver(AgentID receiver)
           
 void setReplyByDate(Date date)
           
 void setReplyTo(AgentID reply)
           
 void setReplyWith(String rw)
           
 void setSender(AgentID sender)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCEPT_PROPOSAL

public static final int ACCEPT_PROPOSAL
constant identifying the FIPA performative *

See Also:
Constant Field Values

AGREE

public static final int AGREE
constant identifying the FIPA performative *

See Also:
Constant Field Values

CANCEL

public static final int CANCEL
constant identifying the FIPA performative *

See Also:
Constant Field Values

CFP

public static final int CFP
constant identifying the FIPA performative *

See Also:
Constant Field Values

CONFIRM

public static final int CONFIRM
constant identifying the FIPA performative *

See Also:
Constant Field Values

DISCONFIRM

public static final int DISCONFIRM
constant identifying the FIPA performative *

See Also:
Constant Field Values

FAILURE

public static final int FAILURE
constant identifying the FIPA performative *

See Also:
Constant Field Values

INFORM

public static final int INFORM
constant identifying the FIPA performative *

See Also:
Constant Field Values

INFORM_IF

public static final int INFORM_IF
constant identifying the FIPA performative *

See Also:
Constant Field Values

INFORM_REF

public static final int INFORM_REF
constant identifying the FIPA performative *

See Also:
Constant Field Values

NOT_UNDERSTOOD

public static final int NOT_UNDERSTOOD
constant identifying the FIPA performative *

See Also:
Constant Field Values

PROPOSE

public static final int PROPOSE
constant identifying the FIPA performative *

See Also:
Constant Field Values

QUERY_IF

public static final int QUERY_IF
constant identifying the FIPA performative *

See Also:
Constant Field Values

QUERY_REF

public static final int QUERY_REF
constant identifying the FIPA performative *

See Also:
Constant Field Values

REFUSE

public static final int REFUSE
constant identifying the FIPA performative *

See Also:
Constant Field Values

REJECT_PROPOSAL

public static final int REJECT_PROPOSAL
constant identifying the FIPA performative *

See Also:
Constant Field Values

REQUEST

public static final int REQUEST
constant identifying the FIPA performative *

See Also:
Constant Field Values

REQUEST_WHEN

public static final int REQUEST_WHEN
constant identifying the FIPA performative *

See Also:
Constant Field Values

REQUEST_WHENEVER

public static final int REQUEST_WHENEVER
constant identifying the FIPA performative *

See Also:
Constant Field Values

SUBSCRIBE

public static final int SUBSCRIBE
constant identifying the FIPA performative *

See Also:
Constant Field Values

PROXY

public static final int PROXY
constant identifying the FIPA performative *

See Also:
Constant Field Values

PROPAGATE

public static final int PROPAGATE
constant identifying the FIPA performative *

See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
constant identifying an unknown performative *

See Also:
Constant Field Values
Constructor Detail

MessageTemplate

public MessageTemplate(String iprotocol)
Creates a new MessageTemplate. This messageTemplate helps us to compare messages that we receive.

Parameters:
iprotocol -
Method Detail

getList_Conversation

public ArrayList<String> getList_Conversation()
Returns Conversations list

Returns:

addConversation

public void addConversation(String conversacion)
Adds new conversation id in the list of conversations

Parameters:
conversacion -

deleteAllConversation

public boolean deleteAllConversation()
Deletes all conversations in the list of conversations

Returns:

deleteConversation

public void deleteConversation(String conversation)
Deletes a conversation id in the list of conversations

Parameters:
conversacion -

add_receiver

public int add_receiver(AgentID a)
Adds a new receiver

Parameters:
a - AgentID
Returns:
status 1: OK -1: error

existReceiver

public boolean existReceiver(AgentID a)
Indicates if a receiver exists in the list of receivers

Parameters:
a - AgentID
Returns:

deleteAllReceiver

public boolean deleteAllReceiver()
Deletes all receivers in the list of receivers

Returns:

getReceiver_list

public ArrayList<AgentID> getReceiver_list()
Returns Receiver list

Returns:

setReceiver_list

public void setReceiver_list(ArrayList<AgentID> receiver_list)
Sets a new receiver list

Parameters:
receiver_list -

setPerformative

public void setPerformative(int performative)
Sets a new performative

Parameters:
performative -

setPerformative

public void setPerformative(String performative)
Sets a new performative

Parameters:
performative -

getPerformative

public String getPerformative()
Returns:
performative

getPerformativeInt

public int getPerformativeInt()
Returns:
performative

setSender

public void setSender(AgentID sender)
Parameters:
sender -

getSender

public AgentID getSender()
Returns:
sender

setReceiver

public void setReceiver(AgentID receiver)
Parameters:
receiver -

getReceiver

public AgentID getReceiver()
Returns:
receiver

setReplyTo

public void setReplyTo(AgentID reply)
Parameters:
reply -

getReplyTo

public AgentID getReplyTo()
Returns:
reply_to

setContent

public void setContent(String cont)
Parameters:
content -

getContent

public String getContent()
Returns:
content

setLanguage

public void setLanguage(String lang)
Parameters:
language -

getLanguage

public String getLanguage()
Returns:
language

setEncoding

public void setEncoding(String encoding)
Parameters:
encoding -

getEncoding

public String getEncoding()
Returns:
encoding

setOntology

public void setOntology(String ontology)
Parameters:
ontology -

getOntology

public String getOntology()
Returns:
ontology

setProtocol

public void setProtocol(String protocol)
Parameters:
protocol -

getProtocol

public String getProtocol()
Returns:
protocol

setConversationId

public void setConversationId(String id)
Parameters:
conversation - id

getConversationId

public String getConversationId()
Returns:
conversation id

setReplyWith

public void setReplyWith(String rw)
Parameters:
reply - with

getReplyWith

public String getReplyWith()
Returns:
reply_with

setInReplyTo

public void setInReplyTo(String irt)
Parameters:
irt - in reply to

getInReplyTo

public String getInReplyTo()
Returns:
in_reply_tp

setReplyByDate

public void setReplyByDate(Date date)
Parameters:
date -

getReplyBy

public String getReplyBy()
Returns:
date

getReplyByDate

public Date getReplyByDate()
Returns:
date


Copyright © 2012 GTI-IA. All Rights Reserved.