com.fluxtion.runtime.node.EventHandlerNode Maven / Gradle / Ivy
/*
* Copyright (C) 2018 2024 gregory higgins.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Server Side Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* .
*/
package com.fluxtion.runtime.node;
import com.fluxtion.runtime.StaticEventProcessor;
import com.fluxtion.runtime.event.Event;
/**
* Acts as the root of an execution path in a {@link StaticEventProcessor}. A
* user implements this class and registers it with the static event compiler,
* to generate a StaticEventProcessor. Events will be routed to an instance of
* this class by the generated StaticEventProcessor at runtime.
*
*
* Filtering
* An EventHandler can optionally provide a filter value to filter the
* events that are accepted for processing. Usually the match is based solely
* on event type to determine if instance of a FilteredEventHandler is on the
* execution path for an event, filtering can further refine the match.
*
*
* An {@link Event} can optionally specify a filter value as an int {@link Event#filterId()
* } or as a String {@link Event#filterString() . The SEP will compare the filter
* values in the {@link Event} and the handler and propagate the Event conditional upon the a match.
* .
*
* Default values for filters indicate only match on type, no filters are applied:
*
* - int filter : Integer.MAX_VALUE = no filtering
* - String filter : null or "" = no filtering
*
*
*
* Child instances that refer to this instance receive update callbacks by invoking marking a method with an {@link com.fluxtion.runtime.annotations.OnTrigger}
* annotation or implementing the {@link TriggeredNode} interface
*
* @param