Type Definitions
-
onComplete(message)
-
A publish operation has completed successfully.
Parameters:
Name Type Description messageeFTLMessage This message has been published. -
onConnect(connection)
-
A new connection to the eFTL server is ready to use.
Parameters:
Name Type Description connectioneFTLConnection The connection that is ready to use. - See:
-
onDisconnect(connection, errorCode, reason)
-
A connection to the eFTL server has closed.
Parameters:
Name Type Description connectioneFTLConnection The connection that closed. errorCodeobject A code categorizes the error. Your program can use this value in its response logic. reasonstring This string provides more detail. Your program can use this value in error reporting and logging. - See:
-
onError(obj, errorCode, reason)
-
An error prevented an operation.
Parameters:
Name Type Description objeFTLConnection | eFTLMessage | object The source of the error. For connection errors, this argument is a connection object. For publish errors, this argument is the message that was not published. For subscription errors, this argument is an object that represents a subscription identifier. errorCodeobject A code categorizes the error. Your program can use this value in its response logic. reasonstring This string provides more detail. Your program can use this value in error reporting and logging. -
onMessage(message)
-
Process an inbound message.
The eFTL library presents inbound messages to this callback for processing. You must implement this callback to process messages.
Parameters:
Name Type Description messageeFTLMessage The inbound message. -
onReconnect(connection)
-
A connection to the eFTL server has re-opened and is ready to use.
The eFTL library invokes this method only after your program calls eFTLConnection#reconnect (and not eFTLConnection#connect).
Parameters:
Name Type Description connectioneFTLConnection The connection that reconnected. -
onReply(reply)
-
A request operation has received a reply.
Parameters:
Name Type Description replyeFTLMessage The reply message. -
onSubscribe(subscriptionId)
-
A new subscription is ready to receive messages.
The eFTL library may invoke this method after the first message arrives.
To close the subscription, call eFTLConnection#unsubscribe with the subscription identifier.
Parameters:
Name Type Description subscriptionIdobject The subscription identifier.