Class StepHandlerMultiplexer
- All Implemented Interfaces:
OrekitStepHandler
OrekitStepHandler instances into one.- Author:
- Luc Maisonobe
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double h, OrekitFixedStepHandler handler) Add a handler for fixed size step.voidadd(OrekitStepHandler handler) Add a handler for variable size step.voidclear()Remove all handlers managed by this multiplexer.voidfinish(SpacecraftState finalState) Finalize propagation.Get an unmodifiable view of all handlers.voidhandleStep(OrekitStepInterpolator interpolator) Handle the current step.voidinit(SpacecraftState s0, AbsoluteDate t) Initialize step handler at the start of a propagation.voidremove(OrekitFixedStepHandler handler) Remove a handler.voidremove(OrekitStepHandler handler) Remove a handler.
-
Constructor Details
-
StepHandlerMultiplexer
public StepHandlerMultiplexer()Simple constructor.
-
-
Method Details
-
add
Add a handler for variable size step.If propagation is ongoing (i.e. global
initalready called and globalfinishnot called yet), then the localOrekitStepHandler.initmethod of the added handler will be called with the last known state, so the handler starts properly.- Parameters:
handler- step handler to add
-
add
Add a handler for fixed size step.If propagation is ongoing (i.e. global
initalready called and globalfinishnot called yet), then the localOrekitFixedStepHandler.initmethod of the added handler will be called with the last known state, so the handler starts properly.- Parameters:
h- fixed stepsize (s)handler- handler called at the end of each finalized step- Since:
- 11.0
-
getHandlers
Get an unmodifiable view of all handlers.Note that if
fixed step handlershave beenadd(double, OrekitFixedStepHandler), then they will show up wrapped withinstep normalizers.- Returns:
- an unmodifiable view of all handlers
- Since:
- 11.0
-
remove
Remove a handler.If propagation is ongoing (i.e. global
initalready called and globalfinishnot called yet), then the localOrekitStepHandler.finishmethod of the removed handler will be called with the last known state, so the handler stops properly.- Parameters:
handler- step handler to remove- Since:
- 11.0
-
remove
Remove a handler.If propagation is ongoing (i.e. global
initalready called and globalfinishnot called yet), then the localOrekitFixedStepHandler.finishmethod of the removed handler will be called with the last known state, so the handler stops properly.- Parameters:
handler- step handler to remove- Since:
- 11.0
-
clear
public void clear()Remove all handlers managed by this multiplexer.If propagation is ongoing (i.e. global
initalready called and globalfinishnot called yet), then the localOrekitStepHandler.finishandOrekitFixedStepHandler.finishmethods of the removed handlers will be called with the last known state, so the handlers stop properly.- Since:
- 11.0
-
init
Initialize step handler at the start of a propagation.This method is called once at the start of the propagation. It may be used by the step handler to initialize some internal data if needed.
The default method does nothing
- Specified by:
initin interfaceOrekitStepHandler- Parameters:
s0- initial statet- target time for the integration
-
handleStep
Handle the current step.- Specified by:
handleStepin interfaceOrekitStepHandler- Parameters:
interpolator- interpolator set up for the current step
-
finish
Finalize propagation.- Specified by:
finishin interfaceOrekitStepHandler- Parameters:
finalState- state at propagation end
-