Enumerations
The IMIconnect JavaScript SDK has the following enumerations:
- IMI.ICAccessLevel
- IMI.ICAccessLevelFilter
- IMI.ICConnectionStatus
- IMI.ICErrorCode
- IMI.ICDeviceProfileParam
- IMI.ICMessageType
IMI.ICAccessLevel
This enumeration describes different access levels a topic can have. Write access is required to publish to a topic. Read access is required to subscribe to a topic.
Value | Description |
---|---|
Read | Users are only permitted to receive message on the topic. |
Write | Users are allowed to publish message on the topic. |
ReadWrite | Users can receive and publish messages on the topic. |
IMI.ICAccessLevelFilter
This enumeration describes different filters used to fetch topics.
Value | Description |
---|---|
All | Used to fetch all the topics regardless of access level. |
Read | Used to fetch the topics with Read access. |
Write | Used to fetch the topics with Write access. |
ReadWrite | Used to fetch the topics with ReadWrite access. |
IMI.ICConnectionStatus
This enumeration describes different connection statuses between the SDK and the Real Time Messaging server.
Value | Description |
---|---|
None | No connection attempt has been made. |
Connecting | The SDK is attempting to establish a connection to the Real Time Messaging server. |
Connected | The SDK is connected and allows you to publish and receive messages. |
Refused | The connection is refused by the server. Note: Currently this value is not used. |
Closed | The SDK is disconnected from the Real Time Messaging server. |
Error | A connection error has occurred. |
IMI.ICErrorCode
This enumeration describes different error codes of the SDK.
Value | Description |
---|---|
Not Initialized | Returned when trying to access a feature without initializing the SDK. |
AlreadyInitialized | Returned when trying to initialize the SDK when it is already initialized. |
ConnectionAlreadyExists | Returned when the connection is already established. |
NotRegistered | Returned when trying to access a feature without registering a user. |
FeatureNotSupported | Returned when trying to access a feature that is not supported by the app. |
InvalidParameterValue | Returned when a required parameter is not passed or an invalid value has been passed to a method. |
PermissionNotGranted | Returned when access is not granted to a permission that is required for an operation. |
NotConnected | Returned when trying to communicate with the RTM server without establishing a connection. |
ConnectionFailure | Returned when a connection is failed between the SDK and RTM server. |
PublishFailed | Returned when a publication of an RTM message has failed. |
SubscribeFailed | Returned when a subscription to an RTM topic has failed. |
UnsubscribeFailed | Returned when trying to unsubscribe from an RTM topic has failed. |
Unknown | Returned when an unknown error occurs. |
DuplicateRegisterListener (code 6026) | Duplicate register listener. |
InvalidToken (code 6027) | Invalid token. |
InvalidAuthorizationRequest (code 6028) | Invalid authorization request. |
TokenExpired (code 6029) | Token has expired. |
TokenRequired (code 6030) | Token is required. |
ICDeviceProfileParam
This enumeration describes different connection statuses and their respective error codes.
Parameter | Description |
---|---|
UserId | Specifies the value passed in the UserId parameter in DeviceProfileParam. |
CustomerId | Specifies the value passed in the CustomerId parameter in DeviceProfileParam. |
ICMessageType
Parameter | Description |
---|---|
Message | Message is a standard RTM. |
ReadReceipt | Message data is a ReadReceipt. Only TransactionId is available and can be used to match receipt to original message. |
Republish | Message is a republish of an MO, all data available in the original message is available. |
Updated over 1 year ago