code: public Closeable onConnectionStateChange(final Consumer<BitfinexConnectionStateEnum> listener) {
          connectionStateConsumers.offer(listener);
          return () -> connectionStateConsumers.remove(listener);
      }
docs: registers listener for notifications on connection state
  @param listener of event
  @return hook of this listener