Skip to content

Class skydata::internal::message::SKLMessage

ClassList > skydata > internal > message > SKLMessage

More...

Inherits the following classes: Serializable

Public Attributes

Type Name
String ontology
String protocol

Public Functions

Type Name
SKLMessage (String ontology, String protocol)
void addReceiver (SKAID r)
void clearReceivers ()
long getArrivalDate ()
Serializable getContent ()
String getMessageId ()
long getNbSent ()
SKAID getReceiver (String name)
ArrayList< SKAID > getReceivers ()
SKAID getSender ()
void removeReceiver (String name)
void setArrivalDate (long ad)
void setContent (Serializable content)
void setMessageId (String id)
void setNbSent (long b)
void setReceivers (ArrayList< SKAID > r)
void setSender (SKAID sender)
ACLMessage toJade (ArrayList< SKAID > receivers)
ACLMessage toJade ()
ACLMessage toJade (SKAID s)

Detailed Description

Represents a message with additional metadata : * ID of the message (generated automatically) * arrival date * receiver * nb of retransmission

Public Attributes Documentation

variable ontology

String skydata.internal.message.SKLMessage.ontology;

The ontology of the message


variable protocol

String skydata.internal.message.SKLMessage.protocol;

The protocol of the message


Public Functions Documentation

function SKLMessage

inline skydata::internal::message::SKLMessage::SKLMessage (
    String ontology,
    String protocol
) 

Construct an empty message


function addReceiver

inline void skydata::internal::message::SKLMessage::addReceiver (
    SKAID r
) 

Add a receiver to the message

Parameters:

  • r : the receiver to add

function clearReceivers

inline void skydata::internal::message::SKLMessage::clearReceivers () 

Clear the list of receivers


function getArrivalDate

inline long skydata::internal::message::SKLMessage::getArrivalDate () 

Get the arrival date of the message

Returns:

the date


function getContent

inline Serializable skydata::internal::message::SKLMessage::getContent () 

Get the wrapped message

Returns:

the wrapped message


function getMessageId

inline String skydata::internal::message::SKLMessage::getMessageId () 

Get the ID of the message

Returns:

the ID


function getNbSent

inline long skydata::internal::message::SKLMessage::getNbSent () 

Get the number of retransmission

Returns:

the number


function getReceiver

inline SKAID skydata::internal::message::SKLMessage::getReceiver (
    String name
) 

Return the identity of the receiver which have a specific name

Useful if you have different adresses for one agent

Parameters:

  • name : the name of the receiver searched

Returns:

the identity


function getReceivers

inline ArrayList< SKAID > skydata::internal::message::SKLMessage::getReceivers () 

Get the JADE identity of the receiver

Returns:

the receiver


function getSender

inline SKAID skydata::internal::message::SKLMessage::getSender () 

function removeReceiver

inline void skydata::internal::message::SKLMessage::removeReceiver (
    String name
) 

Remove all addresses for a specific agent

Parameters:

  • name : the name of the agent

function setArrivalDate

inline void skydata::internal::message::SKLMessage::setArrivalDate (
    long ad
) 

Set the arrival date of the message

Parameters:

  • ad : the date

function setContent

inline void skydata::internal::message::SKLMessage::setContent (
    Serializable content
) 

Set the content of the message

Parameters:

  • msg : the message to wrap

function setMessageId

inline void skydata::internal::message::SKLMessage::setMessageId (
    String id
) 

Set the message ID

Parameters:

  • id : the new id

function setNbSent

inline void skydata::internal::message::SKLMessage::setNbSent (
    long b
) 

Set the number of retransmission

Parameters:

  • b : the new number

function setReceivers

inline void skydata::internal::message::SKLMessage::setReceivers (
    ArrayList< SKAID > r
) 

Set the JADE identity of the receiver

Parameters:

  • r : the new list of receivers

function setSender

inline void skydata::internal::message::SKLMessage::setSender (
    SKAID sender
) 

function toJade [1/3]

inline ACLMessage skydata::internal::message::SKLMessage::toJade (
    ArrayList< SKAID > receivers
) 

function toJade [2/3]

inline ACLMessage skydata::internal::message::SKLMessage::toJade () 

function toJade [3/3]

inline ACLMessage skydata::internal::message::SKLMessage::toJade (
    SKAID s
) 


The documentation for this class was generated from the following file /home/maxime/Desktop/skd_proto_v2/skd/src/main/java/skydata/internal/message/SKLMessage.java