var abetoo = Abetoo.getInstance();
The object is defined as a singleton object, so first at all you have to get the instance.
Used to establish a connection with the remote server, normally called just after obtain the instance Abetoo object. Once the connection is triggered, the abetoo object takes care about connection lost management and reconnections. You need to pass two parameters.
- QueueName, This is an string which represents the local channel id.
- Callback, Used to define a function called whenever a new message is received.
bool sendMessage(String DestinationId, String Body, String Correlationid)
Used to send messages to a remote device using it’s channel id
- DestinationId, channel id of the remote device you want to send a message.
- Body, message as a XML/JSON or as a plain text.
- Correlationid, used to keep track about the messages sent/received. If you want to use a challenge/response approach you can associate the challenge sent message with a correlation id, once a message is received you can use its correlation id to identify the associated challenge message.