Interface ConnectionStateListener
- All Known Subinterfaces:
LeaderSelectorListener
,QueueConsumer<T>
,ServiceCacheListener
,SharedCountListener
,SharedValueListener
- All Known Implementing Classes:
BlockingQueueConsumer
,CircuitBreakingConnectionStateListener
,ExampleClient
,LeaderSelectorListenerAdapter
public interface ConnectionStateListener
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
ConnectionStateListener managers set viaCuratorFrameworkFactory.Builder.connectionStateListenerManagerFactory(ConnectionStateListenerManagerFactory)
are allowed to proxy (etc.) ConnectionStateListeners as needed.void
stateChanged
(CuratorFramework client, ConnectionState newState) Called when there is a state change in the connection
-
Method Details
-
stateChanged
Called when there is a state change in the connection- Parameters:
client
- the clientnewState
- the new state
-
doNotProxy
default boolean doNotProxy()ConnectionStateListener managers set viaCuratorFrameworkFactory.Builder.connectionStateListenerManagerFactory(ConnectionStateListenerManagerFactory)
are allowed to proxy (etc.) ConnectionStateListeners as needed. If this method returnstrue
the ConnectionStateListener manager must not proxy the listener as it's a vital internal listener used by Curator.- Returns:
- true/false
-