Package com.tick42.glue.core.connection
Interface Connection
public interface Connection
Connection API
Use this API to check if the connection is established and to be notified when the connection is established.
- Since:
- 1.7.5
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the connection is established.subscribe(ConnectionListener listener) Subscribes the specified listener to be notified when the connection state is changed.
-
Method Details
-
isConnected
boolean isConnected()Checks if the connection is established.- Returns:
trueif the connection is established,falseotherwise
-
subscribe
Subscribes the specified listener to be notified when the connection state is changed. If the connection is already established, the listener will be notified immediately.- Parameters:
listener- connection listener- Returns:
- a completion stage that will complete when the listener is subscribed.
-