use of io.siddhi.core.exception.DefinitionNotExistException in project siddhi by wso2.
the class SiddhiAppRuntimeImpl method addCallback.
public void addCallback(String streamId, StreamCallback streamCallback) {
streamCallback.setStreamId(streamId);
StreamJunction streamJunction = streamJunctionMap.get(streamId);
if (streamJunction == null) {
throw new DefinitionNotExistException("No stream found with name: " + streamId);
}
streamCallback.setStreamDefinition(streamDefinitionMap.get(streamId));
streamCallback.setContext(siddhiAppContext);
streamJunction.subscribe(streamCallback);
}
use of io.siddhi.core.exception.DefinitionNotExistException in project siddhi by wso2.
the class InputManager method constructTableInputHandler.
public synchronized TableInputHandler constructTableInputHandler(String tableId) {
Table correspondingTable = tableMap.get(tableId);
if (correspondingTable == null) {
throw new DefinitionNotExistException("Table with table ID " + tableId + " has not been defined");
}
TableInputHandler tableInputHandler = new TableInputHandler(correspondingTable, siddhiAppContext);
tableInputHandlerMap.put(tableId, tableInputHandler);
return tableInputHandler;
}
use of io.siddhi.core.exception.DefinitionNotExistException in project siddhi by wso2.
the class InputManager method constructInputHandler.
public synchronized InputHandler constructInputHandler(String streamId) {
InputHandler inputHandler = new InputHandler(streamId, inputHandlerMap.size(), inputEntryValve, siddhiAppContext);
StreamJunction streamJunction = streamJunctionMap.get(streamId);
if (streamJunction == null) {
throw new DefinitionNotExistException("Stream with stream ID " + streamId + " has not been defined");
}
inputDistributor.addInputProcessor(streamJunctionMap.get(streamId).constructPublisher());
inputHandlerMap.put(streamId, inputHandler);
return inputHandler;
}
Aggregations