public void handleStateChanged(Watcher.Event.KeeperState state) throws Exception {
                ZkClientZkClient.this.state = state;
                if (state == KeeperState.Disconnected) {
                    stateChanged(StateListener.DISCONNECTED);
                } else if (state == KeeperState.SyncConnected) {
                    stateChanged(StateListener.CONNECTED);
                } else if (state == KeeperState.Expired) {
                    stateChanged(StateListener.DISCONNECTED);
                }
            }
@author Robert HG (254963746@qq.com) on 7/8/14.
lts-core/src/main/java/com/github/ltsopensource/zookeeper/zkclient/ZkClientZkClient.java