.create(stmtModel) : epAdmin.create(stmtModel, stmtName));
// If an output sink was defined, then we add a subscriber.
if (epStatement.getOutput() != null) {
final String sinkName = epStatement.getOutput();
final Sink sink = _sinksMap.get(sinkName);
final String[] propertyNames = stmt.getEventType()
.getPropertyNames();
if (sink == null) {
_log.warn(
"Statement {} declares the sink {} "
+ "but the corresponding Esper processor does not.",
epStatement, sinkName);
} else {
final EsperStatementSubscriber subscriber = new EsperStatementSubscriber(
sink, propertyNames);
_log.info("Adding subscriber {} to statement {}", sink.getId(),
epStatement);
stmt.setSubscriber(subscriber);
}
}
}