netflix.ocelli.functions.Connectors Maven / Gradle / Ivy
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);
}
};
}
}