Search in sources :

Example 1 with QueryNotExistException

use of org.wso2.siddhi.core.exception.QueryNotExistException in project siddhi by wso2.

the class SiddhiAppRuntime method addCallback.

public void addCallback(String queryName, QueryCallback callback) {
    callback.setContext(siddhiAppContext);
    QueryRuntime queryRuntime = queryProcessorMap.get(queryName);
    if (queryRuntime == null) {
        throw new QueryNotExistException("No query found with name: " + queryName);
    }
    callback.setQuery(queryRuntime.getQuery());
    queryRuntime.addCallback(callback);
}
Also used : QueryNotExistException(org.wso2.siddhi.core.exception.QueryNotExistException) QueryRuntime(org.wso2.siddhi.core.query.QueryRuntime) StoreQueryRuntime(org.wso2.siddhi.core.query.StoreQueryRuntime)

Aggregations

QueryNotExistException (org.wso2.siddhi.core.exception.QueryNotExistException)1 QueryRuntime (org.wso2.siddhi.core.query.QueryRuntime)1 StoreQueryRuntime (org.wso2.siddhi.core.query.StoreQueryRuntime)1