private OutputImpl implOrFail(Output output) { final OutputImpl outputImpl; if (output instanceof OutputImpl) { outputImpl = (OutputImpl) output; return outputImpl; } else { throw new IllegalArgumentException( "Supplied output must be of implementation type OutputImpl, not " + output.getClass()); } }
@Override public void destroy(Output model) throws NotFoundException { coll.removeById(model.getId()); outputRegistry.removeOutput(model); streamService.removeOutputFromAllStreams(model); }