public class ConnectionStateManager
extends java.lang.Object
implements java.io.Closeable
Constructor and Description |
---|
ConnectionStateManager(CuratorFramework client,
java.util.concurrent.ThreadFactory threadFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addStateChange(ConnectionState newState)
Post a state change.
|
void |
close() |
ListenerContainer<ConnectionStateListener> |
getListenable()
Return the listenable
|
void |
start()
Start the manager
|
public ConnectionStateManager(CuratorFramework client, java.util.concurrent.ThreadFactory threadFactory)
client
- the clientthreadFactory
- thread factory to use or null for a defaultpublic void start()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public ListenerContainer<ConnectionStateListener> getListenable()
public void addStateChange(ConnectionState newState)
newState
- new state