@Test public void testConnect() throws MqttException { final MqttAndroidClient client = RxMqtt.client(RuntimeEnvironment.application, url); TestObserver observer = RxMqtt.connect(client).doOnNext(new Consumer<IMqttToken>() { @Override public void accept(IMqttToken token) throws Exception { System.out.println(token); } }).test(); observer.awaitTerminalEvent(); observer.assertTerminated(); }
@NonNull @CheckReturnValue public static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client) { return connect(client, new MqttConnectOptions(), null); }
RxMqtt { @NonNull @CheckReturnValue public static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client) { return connect(client, new MqttConnectOptions(), null); } }
RxMqtt { @NonNull @CheckReturnValue public static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client) { return connect(client, new MqttConnectOptions(), null); }  }
RxMqtt { @NonNull @CheckReturnValue public static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client) { return connect(client, new MqttConnectOptions(), null); }  @NonNull static MqttAndroidClient client(
            @NonNull final Context context,
            @NonNull final String url); @NonNull @CheckReturnValue static Observable<MqttMessage> remessage(@NonNull final MqttAndroidClient client,
                                                    @NonNull final String topic); @NonNull @CheckReturnValue static Observable<MqttMessage> message(@NonNull final MqttAndroidClient client,
                                                  @NonNull final String topic); @NonNull @CheckReturnValue static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client); @NonNull @CheckReturnValue static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client,
                                            @NonNull final MqttConnectOptions options); @NonNull @CheckReturnValue static Maybe<IMqttToken> connect(
            @NonNull final MqttAndroidClient client,
            @NonNull final DisconnectedBufferOptions disconnectedBufferOptions); @NonNull @CheckReturnValue static DisconnectedBufferOptions defaultDisconnectedBufferOptions(); static Maybe<IMqttToken> connect(
            @NonNull final MqttAndroidClient client,
            @NonNull final MqttConnectOptions options,
            @Nullable final DisconnectedBufferOptions bufferOptions); static SSLSocketFactory sslSocketFactory(); static SSLSocketFactory sslSocketFactory(@NonNull String protocol); static Maybe<IMqttToken> reconnect(@NonNull final MqttAndroidClient client); static Maybe<IMqttToken> reconnect(
            @NonNull final MqttAndroidClient client,
            @NonNull final MqttConnectOptions options); static Maybe<IMqttToken> reconnect(
            @NonNull final MqttAndroidClient client,
            @NonNull final MqttConnectOptions options,
            @Nullable final DisconnectedBufferOptions bufferOptions); @NonNull static MqttConnectOptions reconnectOptions(); @NonNull static MqttConnectOptions reconnectOptions(@NonNull final MqttConnectOptions options); static void disconnectAndCloseAsync(@NonNull final MqttAndroidClient client); @NonNull @CheckReturnValue static Maybe<IMqttToken> publish(@NonNull final MqttAndroidClient client,
                                            @NonNull final String topic,
                                            @NonNull final MqttMessage message); }
RxMqtt { @NonNull @CheckReturnValue public static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client) { return connect(client, new MqttConnectOptions(), null); }  @NonNull static MqttAndroidClient client(
            @NonNull final Context context,
            @NonNull final String url); @NonNull @CheckReturnValue static Observable<MqttMessage> remessage(@NonNull final MqttAndroidClient client,
                                                    @NonNull final String topic); @NonNull @CheckReturnValue static Observable<MqttMessage> message(@NonNull final MqttAndroidClient client,
                                                  @NonNull final String topic); @NonNull @CheckReturnValue static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client); @NonNull @CheckReturnValue static Maybe<IMqttToken> connect(@NonNull final MqttAndroidClient client,
                                            @NonNull final MqttConnectOptions options); @NonNull @CheckReturnValue static Maybe<IMqttToken> connect(
            @NonNull final MqttAndroidClient client,
            @NonNull final DisconnectedBufferOptions disconnectedBufferOptions); @NonNull @CheckReturnValue static DisconnectedBufferOptions defaultDisconnectedBufferOptions(); static Maybe<IMqttToken> connect(
            @NonNull final MqttAndroidClient client,
            @NonNull final MqttConnectOptions options,
            @Nullable final DisconnectedBufferOptions bufferOptions); static SSLSocketFactory sslSocketFactory(); static SSLSocketFactory sslSocketFactory(@NonNull String protocol); static Maybe<IMqttToken> reconnect(@NonNull final MqttAndroidClient client); static Maybe<IMqttToken> reconnect(
            @NonNull final MqttAndroidClient client,
            @NonNull final MqttConnectOptions options); static Maybe<IMqttToken> reconnect(
            @NonNull final MqttAndroidClient client,
            @NonNull final MqttConnectOptions options,
            @Nullable final DisconnectedBufferOptions bufferOptions); @NonNull static MqttConnectOptions reconnectOptions(); @NonNull static MqttConnectOptions reconnectOptions(@NonNull final MqttConnectOptions options); static void disconnectAndCloseAsync(@NonNull final MqttAndroidClient client); @NonNull @CheckReturnValue static Maybe<IMqttToken> publish(@NonNull final MqttAndroidClient client,
                                            @NonNull final String topic,
                                            @NonNull final MqttMessage message);  }