class RxRocketChatClient implements ConnectListener {

    public Single<Token> signin(final String username, final String password) {
        return Single.create(new SingleOnSubscribe<Token>() {
            @Override
            public void subscribe(final SingleEmitter<Token> emitter) throws Exception {
                client.signin(username, password, new LoginCallback() {
                    @Override
                    public void onLoginSuccess(Token token) {
                        emitter.onSuccess(token);
                    }

                    @Override
                    public void onError(RocketChatException error) {
                        emitter.onError(error);
                    }
                });
            }
        });
    }

    public  RxRocketChatClient(RocketChatClient client);

}