netflix.ocelli.functions.Connectors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ocelli-core Show documentation
Show all versions of ocelli-core Show documentation
ocelli-core developed by Netflix
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