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

Performative

Type: string

Static Members

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 = false) 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, timeout)
get(params, index, timeout)

Base class for messages transmitted by one agent to another. Creates an empty message.

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

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

new GenericMessage()

Extends Message

A gateway for connecting to a fjage master container. The new version of the constructor uses an options object instead of individual parameters. The old version with

new Gateway(opts: Object)
Parameters
opts (Object = {})
Name Description
opts.hostname string (default "localhost") hostname/ip address of the master container to connect to
opts.port number (default 1100) port number of the master container to connect to
opts.pathname string (default "") path of the master container to connect to (for WebSockets)
opts.keepAlive string (default true) try to reconnect if the connection is lost
opts.queueSize number (default 128) size of the queue of received messages that haven't been consumed yet
opts.timeout number (default 1000) timeout for fjage level messages in ms
opts.returnNullOnFailedResponse boolean (default true) return null instead of throwing an error when a parameter is not found
Instance Members
addEventListener(type, listener)
removeEventListener(type, listener)
addMessageListener(listener)
removeMessageListener(listener)
addConnListener(listener)
removeConnListener(listener)
getAgentID()
agent(name)
topic(topic, topic2)
subscribe(topic)
unsubscribe(topic)
agents()
containsAgent(agentID)
agentForService(service)
agentsForService(service)
send(msg)
flush()
request(msg, timeout)
receive(filter, timeout)
close()

Services supported by fjage agents.

Services
Static Members

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

new MessageClass(name: string, parent: any)
Parameters
name (string) fully qualified name of the message class to be created
parent (any = Message)
Example
const ParameterReq = MessageClass('org.arl.fjage.param.ParameterReq');
let pReq = new ParameterReq()

ParameterReq.Entry

gateways/js/src/fjage.js
ParameterReq.Entry

Type: Object

Properties
param (string) : parameter name
value (Object) : parameter value

A message that requests one or more parameters of an agent.

ParameterReq

Type: Message

Properties
param (string) : parameters name to be get/set if only a single parameter is to be get/set
value (Object) : parameters value to be set if only a single parameter is to be set
requests (Array<ParameterReq.Entry>) : a list of multiple parameters to be get/set
index (number?) : index of parameter(s) to be set