public class ConnectionStateManager extends Object implements Closeable
Constructor and Description |
---|
ConnectionStateManager(CuratorFramework client,
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, ThreadFactory threadFactory)
client
- the clientthreadFactory
- thread factory to use or null for a defaultpublic void start()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public ListenerContainer<ConnectionStateListener> getListenable()
public void addStateChange(ConnectionState newState)
newState
- new stateCopyright © 2011–2013 The Apache Software Foundation. All rights reserved.