Class EventMultipleHandler

    • Constructor Detail

      • EventMultipleHandler

        public EventMultipleHandler()
        Constructor with list initialisation.
    • Method Detail

      • init

        public void init​(SpacecraftState initialState,
                         AbsoluteDate target,
                         EventDetector detector)
        Initialize event handler at the start of a propagation.

        This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.

        The default implementation does nothing

        All handlers' init methods are successively called, the order method is the order in which handlers are added

        Specified by:
        init in interface EventHandler
        initialState - initial state
        target - target date for the propagation
        detector - event detector related to the event handler
      • eventOccurred

        public Action eventOccurred​(SpacecraftState s,
                                    EventDetector detector,
                                    boolean increasing)
        Handle an event. The MultipleEventHandler class implies a different behaviour on event detections than with other handlers : Without the MultipleEventHandler, there is a total order on event occurrences. Handlers H1, H2, ... that are associated with different instances of AbstractDetector are successively called and Action from H1 can prevent H2 from happening if H1 returned resetState. With the MultipleEventHandler class, when event E occurs, all methods eventOccurred of Handlers H1, H2... from MultiEventHandler attributes are called, then Action is decided.
        Specified by:
        eventOccurred in interface EventHandler
        s - SpaceCraft state to be used in the evaluation
        detector - object with appropriate type that can be used in determining correct return state
        increasing - with the event occurred in an "increasing" or "decreasing" slope direction
        the Action that the calling detector should pass back to the evaluation system
      • addHandler

        public EventMultipleHandler addHandler​(EventHandler handler)
        Add one handler to the managed handlers list.
        handler - handler associated with D detector
        this object
      • addHandlers

        public final EventMultipleHandler addHandlers​(EventHandler... newHandlers)
        Add several handlers to the managed handlers list.
        newHandlers - handlers associated with D detector
        this object
      • setHandlers

        public void setHandlers​(List<EventHandler> newHandlers)
        Change handlers list with user input.
        newHandlers - new handlers list associated with D detector
      • getHandlers

        public List<EventHandler> getHandlers()
        Retrieve managed handlers list.
        list of handlers for event overrides