public DataFlowOpInitializeResult initialize(DataFlowOpInitializateContext context) throws Exception { if (!context.getOutputPorts().isEmpty()) { throw new IllegalArgumentException("LogSink operator does not provide an output stream"); } dataflowName = context.getDataflowName(); dataFlowInstanceId = context.getDataflowInstanceId(); shellPerStream = new EventBeanSPI[context.getInputPorts().size()]; for (Map.Entry<Integer, DataFlowOpInputPort> entry : context.getInputPorts().entrySet()) { EventType eventType = entry.getValue().getTypeDesc().getEventType(); if (eventType != null) { shellPerStream[entry.getKey()] = context.getStatementContext().getEventAdapterService().getShellForType(eventType); } } if (format == null) { renderer = new ConsoleOpRendererSummary(); } else { try { LogSinkOutputFormat formatEnum = LogSinkOutputFormat.valueOf(format.trim().toLowerCase()); if (formatEnum == LogSinkOutputFormat.summary) { renderer = new ConsoleOpRendererSummary(); } else { renderer = new ConsoleOpRendererXmlJSon(formatEnum, context.getEngine().getEPRuntime()); } } catch (RuntimeException ex) { throw new ExprValidationException( "Format '" + format + "' is not supported, expecting any of " + Arrays.toString(LogSinkOutputFormat.values())); } } return null; }