Required Client-Side Methods

These methods are supported for REST API only.

Method "bind"

A bind request is made when a new data gateway is started on the Fusion Connect platform. It informs the adapter that a gateway has been registered with the Fusion Connect application server, and of the hostname and port of the server to which it must send its messages. It also sends a confirmation message to the application server via TCP that contains the key parameter, encoded. This method takes 4 parameters: "gateway code", which uniquely identifies the individual gateway being registered and corresponds to the code of the gateway defined by the user on the Fusion Connect platform; "host", which is the hostname of the Fusion Connect server to which the adapter must send messages from that gateway; "port", the port of that server to which the adapter must connect; and "key", which the adapter will use to authenticate all future requests from Fusion Connect to that gateway.

Method "unbind"

An unbind request is made when a data gateway is shutdown by a user on the Fusion Connect platform. It informs the adapter that a gateway has been deregistered with the Fusion Connect application server and that Fusion Connect will no longer accept messages from that gateway. This method takes 2 parameters: "gateway code", which uniquely identifies the gateway being unbound; and "key", which authenticates that the "unbind" request comes from the same source that originally called the "bind" request for that gateway. If the key provided by the request does not match the one made by the original bind request for the specified gateway, or if the gateway code does not match any gateway handled by this adapter, this method does nothing.

Method "directive"

A directive request is made when the routines defined in a Fusion Connect application dictate that a command or message be sent to a physical device in the field. This method takes three parameters: "gateway code" which uniquely identifies the gateway to which the directive must be sent; "key", which the adapter uses to authenticate the source of the request; and "messages", a string containing one or more messages that the adapter must send to the device. If any of these parameters is empty, or either of the first two are invalid, this method does nothing. If the nature of the application is such that Fusion Connect will never send a command or message back to a physical device, then this method does not need to be implemented.