These are chat archives for ReactiveX/RxJava

Aug 2016
Aug 31 2016 00:29
@gruns Oops right, Java doesn't really support anon classes that get passed around. Guess you have to lift a small data-object. That's unrelated to lambdas, those can run on Java android if you use retrolambda.
Behzodbek Qodirov
Aug 31 2016 20:25

I have this class. I’d like client of this class get the instance of the field chatHub as soon as it assigned in the callback

connection.connected(() -> chatHub = connection.createHubProxy("ChatHub"));

chatHub might be null. We have to push chatHub through subscriber as soon as it has been initialized;
any ideas?

public class SignalRManager {
    private HubProxy chatHub;

    public SignalRManager() {
        Platform.loadPlatformComponent(new AndroidPlatformComponent());

        HubConnection connection = new HubConnection("");
        connection.stateChanged((connectionState, connectionState2) -> Log.i("SignalR", + "->" +;
        connection.closed(() -> {
            Log.i("SignalR", "Closed");
            chatHub = null;
        connection.connected(() -> chatHub = connection.createHubProxy("ChatHub"));


    Observable<HubProxy> getHubProxy(){