@Test public void createEvent() { Map<String, Value> parameters = new HashMap<>(); parameters.put("test", Value.of(123L)); GenericEvent event = handler.createEvent("testEvent", context, parameters); assertEquals(123L,(long)event.getParameter("test").getAsLong()); GenericExtractorTriggerHandler clone = ClonerUtil.clone(handler); event = clone.createEvent("testEvent", context, parameters); assertEquals(123L,(long)event.getParameter("test").getAsLong()); }
@Override protected GenericEvent createEvent( String eventName, EvaluationContext<GenericEvent> context, Map<String, Value> parameters ) { return GenericEventBuilder.anEvent() .withEvent(eventName) .withSource(context.get().getSource()) .withTimestamp(context.get().getTimestamp()) .withParameters(parameters) .build(); }
GenericExtractorTriggerHandler extends ExtractorTriggerHandler<GenericEvent> { @Override protected GenericEvent createEvent( String eventName, EvaluationContext<GenericEvent> context, Map<String, Value> parameters ) { return GenericEventBuilder.anEvent() .withEvent(eventName) .withSource(context.get().getSource()) .withTimestamp(context.get().getTimestamp()) .withParameters(parameters) .build(); } }
GenericExtractorTriggerHandler extends ExtractorTriggerHandler<GenericEvent> { @Override protected GenericEvent createEvent( String eventName, EvaluationContext<GenericEvent> context, Map<String, Value> parameters ) { return GenericEventBuilder.anEvent() .withEvent(eventName) .withSource(context.get().getSource()) .withTimestamp(context.get().getTimestamp()) .withParameters(parameters) .build(); } GenericExtractorTriggerHandler(String eventName, MapExtractor... extractors);  GenericExtractorTriggerHandler(String eventName, Collection<MapExtractor> extractors); }
GenericExtractorTriggerHandler extends ExtractorTriggerHandler<GenericEvent> { @Override protected GenericEvent createEvent( String eventName, EvaluationContext<GenericEvent> context, Map<String, Value> parameters ) { return GenericEventBuilder.anEvent() .withEvent(eventName) .withSource(context.get().getSource()) .withTimestamp(context.get().getTimestamp()) .withParameters(parameters) .build(); } GenericExtractorTriggerHandler(String eventName, MapExtractor... extractors);  GenericExtractorTriggerHandler(String eventName, Collection<MapExtractor> extractors);  }
GenericExtractorTriggerHandler extends ExtractorTriggerHandler<GenericEvent> { @Override protected GenericEvent createEvent( String eventName, EvaluationContext<GenericEvent> context, Map<String, Value> parameters ) { return GenericEventBuilder.anEvent() .withEvent(eventName) .withSource(context.get().getSource()) .withTimestamp(context.get().getTimestamp()) .withParameters(parameters) .build(); } GenericExtractorTriggerHandler(String eventName, MapExtractor... extractors);  GenericExtractorTriggerHandler(String eventName, Collection<MapExtractor> extractors);   }