Skip to main content

Product: OpenFusion Notification Service

Version: 2.1 and above

 

Description:

Can the consumer obtain the state of the connection to the proxy?

 

Solution:

The connection between the consumer and the proxy can be in one of three states:
a) Connected
b) Disconnected
c) Suspended

The Notification Service does not have a direct way for the consumer to obtain the state of the connection. There are some indirect ways to obtain this.

In order to tell if the proxy has been suspended the consumer can call the resume_connection() method on the proxy reference. If the proxy is not suspended then a ConnectionAlreadyActive exception is thrown. If the proxy has been suspended then this call will resume event delivery and return without error.

To tell if the proxy is connected to a consumer you can call connect() on the proxy reference. This will throw an AlreadyConnected exception if the proxy is connected to a consumer. If the connection has gone for any reason then the proxy will reconnect to the consumer.


#notificationservice
#KnowledgeDocs
#OpenFusion