package jp.ac.do_johodai.j314.sw.je;

/**
 * JenaEngineの非同期メソッドの入力と出力で使用するための
 * メッセージです。
 */
public class JEMessage {
    public enum Type {
        SPARQL,
        INSERT_N3,
        DELETE_N3,
        SET_TIMER,
        SET_RULES,
        LOAD_RDF,
        DEL_SPARQL,
        INS_SPARQL,
        SET_INPUT,
        DEL_INS_SPARQL}

    Type type;
    JEListener listener;
    Object[] args;
    Object result;
    Object userData;

    public JEMessage(Type t, JEListener l, Object... args) {
        type = t;
        listener = l;
        this.args = args;
    }

    public Type getType() {
        return type;
    }

    public void setUserData(Object o) {
        userData = o;
    }

    public Object getUserData() {
        return userData;
    }

    public Object getResult() {
        return result;
    }
}
