You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by GitBox <gi...@apache.org> on 2021/10/20 15:53:12 UTC

[GitHub] [incubator-streampipes-extensions] tenthe commented on pull request #51: [STREAMPIPES-] Processing Element: Detect Value Change

tenthe commented on pull request #51:
URL: https://github.com/apache/incubator-streampipes-extensions/pull/51#issuecomment-947804362


   The structure of your code looks good, however this is the old API (Unfortunately we did not document the new API somewhere) Here you can see the structure of the new API. This class replaces the three classes with a single one:
   
   public class ValueChangeProcessor extends StreamPipesDataProcessor {
   
       @Override
       public DataProcessorDescription declareModel() {
           return ProcessingElementBuilder.create("org.apache.streampipes.processors.enricher.jvm.valueChange")
                   .category(DataProcessorType.ENRICH)
                   .withAssets(Assets.DOCUMENTATION, Assets.ICON)
                   .withLocales(Locales.EN)
                   .requiredStream(StreamRequirementsBuilder
                           .create()
                           .requiredProperty(EpRequirements.anyProperty())
                           .build())
                   .requiredStream(StreamRequirementsBuilder.create()
                           .requiredProperty(EpRequirements.anyProperty()).build())
                   .build();
       }
   
       @Override
       public void onInvocation(ProcessorParams processorParams, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext eventProcessorRuntimeContext) throws SpRuntimeException {
       }
   
       @Override
       public void onEvent(Event event, SpOutputCollector spOutputCollector) throws SpRuntimeException {
       }
   
       @Override
       public void onDetach() throws SpRuntimeException {
       }
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org