1 Reply Latest reply on May 28, 2009 4:29 PM by 807557

    When is Timer.fire() called


      in my application I have a timer running and a handler listening to the timer. The timer running is an own class that extends PeriodicTimer. In this timer I have overridden the fire() method like:
      public void fire() {
      I hoped that everytime the timer fires, the String someString would be printed and no handler would be activated, because my overridden fire() method does not care about all the handlers, listening to this timer. But the string is never printed - the fire() method does not seem to be called, but the handlers are still activated everytime the timer fires. How come?

      Is there any possibility to get noticed by the timer directly (not an attached handler) that it fires (as i expected the method fire() would be called at this moment)?

        • 1. Re: When is Timer.fire() called
          Timer.fire() is never called in Java RTS. I know the spec kind of implies it might be, but the reality is that fire() is the public API for triggering an event, it isn't used by the implementation - where the actually timer firing and AEH release all happens in native code.

          So there are no "hooks" other than release of the AEH themselves.

          David Holmes