All Downloads are FREE. Search and download functionalities are using the official Maven repository.

netflix.ocelli.functions.Connectors Maven / Gradle / Ivy

There is a newer version: 0.1.0-rc.2
Show newest version
package netflix.ocelli.functions;

import netflix.ocelli.ClientConnector;
import rx.Observable;

public abstract class Connectors {
    public static  ClientConnector never() {
        return new ClientConnector() {
            @Override
            public Observable call(C client) {
                return Observable.never();
            }
        };
    }
    
    public static  ClientConnector immediate() {
        return new ClientConnector() {
            @Override
            public Observable call(C client) {
                return Observable.just(client);
            }
        };
    }
    
    public static  ClientConnector failure(final Throwable t) {
        return new ClientConnector() {
            @Override
            public Observable call(C client) {
                return Observable.error(t);
            }
        };
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy