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

org.nustaq.kontraktor.frontend.SimpleSubsMixin Maven / Gradle / Ivy

There is a newer version: 5.2.0
Show newest version
package org.nustaq.kontraktor.frontend;

import org.nustaq.kontraktor.Callback;
import org.nustaq.kontraktor.IPromise;
import org.nustaq.kontraktor.Promise;
import org.nustaq.reallive.api.ChangeMessage;

public interface SimpleSubsMixin {

    SubsRegistry getReg();

    default void query(String tbl, String query, Callback cb) {
        getReg().query(tbl,query,null,cb);
    }

    default IPromise getSubsId() {
        return new Promise<>(getReg().getSubsId());
    }

    default void subscribe(int subsId, String tableName, String filter, Callback changeReceiver) {
        getReg().subscribe(subsId,tableName,filter,null,changeReceiver);
    }

    default void unsubscribe(int subsid) {
        getReg().unsubscribe(subsid);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy