public abstract class

Message

extends Object
implements Action Input
java.lang.Object
   ↳ uk.ac.imperial.presage2.core.network.Message
Known Direct Subclasses

Class Overview

This is a basic message to be sent between agents.

This message will only send a performative. If you want to send any objects/data with the message you should extend this class.

Summary

Fields
protected UUID conversationKey Optional conversation key.
protected Object data
protected NetworkAddress from Sender of this message
protected final Performative performative FIPA performative of the message
protected String protocol Optional protocol name.
protected Time timestamp Timestamp of when this message was sent.
protected String type
Public Constructors
Message(Performative performative, String type, Time timestamp, NetworkAddress from)
Message(Performative performative, String type, Time timestamp, NetworkAddress from, Object data)
Message(Performative performative, NetworkAddress from, Time timestamp)
Message(Performative performative, NetworkAddress from, Time timestamp, Object data)
Public Methods
UUID getConversationKey()
Object getData()
Get the data in this message.
NetworkAddress getFrom()
Get the sender of this message
Performative getPerformative()
Get the FIPA performative of this Input (if applicable).
String getProtocol()
Time getTimestamp()
Get the timestamp of this Input.
String getType()
Get the type of this Input
void setConversationKey(UUID conversationKey)
void setProtocol(String protocol)
void setTimestamp(Time t)
set the timestamp of this Input
void setType(String type)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface uk.ac.imperial.presage2.core.messaging.Input

Fields

protected UUID conversationKey

Optional conversation key.

protected Object data

protected NetworkAddress from

Sender of this message

protected final Performative performative

FIPA performative of the message

protected String protocol

Optional protocol name.

protected Time timestamp

Timestamp of when this message was sent.

protected String type

Public Constructors

public Message (Performative performative, String type, Time timestamp, NetworkAddress from)

public Message (Performative performative, String type, Time timestamp, NetworkAddress from, Object data)

public Message (Performative performative, NetworkAddress from, Time timestamp)

public Message (Performative performative, NetworkAddress from, Time timestamp, Object data)

Public Methods

public UUID getConversationKey ()

public Object getData ()

Get the data in this message.

public NetworkAddress getFrom ()

Get the sender of this message

Returns
  • UUID of message sender.

public Performative getPerformative ()

Get the FIPA performative of this Input (if applicable).

Returns

public String getProtocol ()

public Time getTimestamp ()

Get the timestamp of this Input.

Returns
See Also

public String getType ()

Get the type of this Input

public void setConversationKey (UUID conversationKey)

public void setProtocol (String protocol)

public void setTimestamp (Time t)

set the timestamp of this Input

Parameters
t Time to set.

public void setType (String type)

public String toString ()

Since: API Level

See Also