You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by Patrick Wiener <wi...@apache.org> on 2020/09/04 08:51:00 UTC

EventProcessor interface methods

Hi,

while going through our archetypes one thing I found was that we currently have the following interface
for data processors, that is implemented [1]:

public interface EventProcessor<B extends EventProcessorBindingParams> extends
        PipelineElement<B, DataProcessorInvocation> {
  void onInvocation(B parameters, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) throws
          SpRuntimeException;
  void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeException;
}

I don’t really know at this point why we would need the SpOutCollector as part of the onInvocation method. 
Is there really a case where we would need it here?

Otherwise we could mark it as deprecated and add a new onInvocation(B params, EventProcessorRuntimeContext ctx).

Patrick


[1] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-wrapper/src/main/java/org/apache/streampipes/wrapper/runtime/EventProcessor.java