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

quark.concurrent.FutureCompletion Maven / Gradle / Ivy

There is a newer version: 2.0.37
Show newest version
/* Quark 1.0.452 run at 2016-11-11 16:09:46.008093 */
package quark.concurrent;

/**
 * internal class that binds a listener to a future
 */
public class FutureCompletion implements Event, io.datawire.quark.runtime.QObject {
    public static quark.reflect.Class quark_concurrent_FutureCompletion_ref = datawire_mdk_md.Root.quark_concurrent_FutureCompletion_md;
    public Future future;
    public FutureListener listener;
    public FutureCompletion(Future future, FutureListener listener) {
        (this).future = future;
        (this).listener = listener;
    }
    public EventContext getContext() {
        return (this).future;
    }
    public void fireEvent() {
        ((this).listener).onFuture((this).future);
    }
    public String _getClass() {
        return "quark.concurrent.FutureCompletion";
    }
    public Object _getField(String name) {
        if ((name)==("future") || ((Object)(name) != null && ((Object) (name)).equals("future"))) {
            return (this).future;
        }
        if ((name)==("listener") || ((Object)(name) != null && ((Object) (name)).equals("listener"))) {
            return (this).listener;
        }
        return null;
    }
    public void _setField(String name, Object value) {
        if ((name)==("future") || ((Object)(name) != null && ((Object) (name)).equals("future"))) {
            (this).future = (Future) (value);
        }
        if ((name)==("listener") || ((Object)(name) != null && ((Object) (name)).equals("listener"))) {
            (this).listener = (FutureListener) (value);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy