Performative

An action represented by a message. The performative actions are a subset of the FIPA ACL recommendations for interagent communication.

Performative

AgentID

An identifier for an agent or a topic.

new AgentID(name: string, topic: boolean, owner: Gateway)
Parameters
name (string) name of the agent.
topic (boolean) name of topic.
owner (Gateway) Gateway owner for this AgentID.
Instance Members
getName()
isTopic()
send(msg)
request(msg, timeout)
toString()
toJSON()
set(params, values, index)
get(params, index)

Message

Base class for messages transmitted by one agent to another. This class provides the basic attributes of messages and is typically extended by application-specific message classes. To ensure that messages can be sent between agents running on remote containers, all attributes of a message must be serializable.

new Message(inReplyTo: Message, perf: Performative)
Parameters
inReplyTo (Message = {msgID:null,sender:null}) message to which this response corresponds to.
perf (Performative = '') performative
Instance Members
toString()

GenericMessage

A message class that can convey generic messages represented by key-value pairs.

new GenericMessage()

Extends Message

Gateway

Gateway to communicate with agents from Java classes. Only agents in a master or slave container can be accessed using this gateway.

new Gateway(hostname: string, port: int, pathname: string, timeout: int)
Parameters
hostname (string = window.location.hostname) hostname of the master container to connect to
port (int = window.location.port) port of the master container to connect to
pathname (string = '/ws/') path of the master container to connect to
timeout (int = 1000) timeout for fjage level messages
Instance Members
addMessageListener(listener)
removeMessageListener(listener)
addConnListener(listener)
removeConnListener(listener)
getAgentID()
agent(name)
topic(topic, topic2)
subscribe(topic)
unsubscribe(topic)
agentForService(service)
agentsForService(service)
send(msg)
flush()
request(msg, timeout)
receive(filter, timeout)
close()

Services

Services supported by fjage agents.

Services

MessageClass

Creates a unqualified message class based on a fully qualified name.

new MessageClass(name: string, parent: string?): function
Parameters
name (string) fully qualified name of the message class to be created.
parent (string? = Message) Class of the parent MessageClass to inherit from.
Returns
function: constructor for the unqualified message class.