ws.wamp.jawampa.connection.IWampConnectionPromise Maven / Gradle / Ivy
package ws.wamp.jawampa.connection;
public interface IWampConnectionPromise extends IWampConnectionFuture {
void fulfill(T value);
void reject(Throwable error);
boolean isSuccess();
Throwable error();
/**
* A default implementation of the promise whose instance methods do nothing.
* Can be used in cases where the caller is not interested in the call results.
*/
public static final IWampConnectionPromise Empty = new IWampConnectionPromise() {
@Override
public Void result() {
return null;
}
@Override
public Object state() {
return null;
}
@Override
public void fulfill(Void value) {
}
@Override
public void reject(Throwable error) {
}
@Override
public boolean isSuccess() {
return false;
}
@Override
public Throwable error() {
return null;
}
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy