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 rx.Observable;
import rx.functions.Func1;

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy