/** * The <code>insertProbe()</code> method allows the insertion of a probe for each state transition * of this finite state machine. * * @param p the probe to insert that will be called before and after each transition, including * self-transitions (transitions from one state to the same state) */ public void insertProbe(Probe p) { globalProbe.add(p); }
/** * The <code>removeProbe()</code> method removes a probe that has been inserted for all state * transitions. * * @param p the probe to remove */ public void removeProbe(Probe p) { globalProbe.remove(p); }
private static void fireAfter(MulticastFSMProbe p, int oldState, int newState) { if (!p.isEmpty()) p.fireAfterTransition(oldState, newState); }