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

Performative

Type: Object

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) 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: any, null-null: Performative)
Parameters
inReplyTo (Message = {msgID:null,sender:null}) message to which this response corresponds to
perf (any = '')
null-null (Performative) 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, port: number?, pathname: string, timeout: number, hostname: string)
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
port (number?) Deprecated : port number of the master container to connect to
pathname (string = ="/ws/") Deprecated : path of the master container to connect to (for WebSockets)
timeout (number = 1000) Deprecated : timeout for fjage level messages in ms
hostname (string = "localhost") Deprecated : hostname/ip address of the master container to connect to
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: class): function
Parameters
name (string) fully qualified name of the message class to be created
parent (class = Message) class of the parent MessageClass to inherit from
Returns
function: constructor for the unqualified message class
Example
const ParameterReq = MessageClass('org.arl.fjage.param.ParameterReq');
let pReq = new ParameterReq()