Back to project page client-android.
The source code is released under:
Apache License
If you think the Android project client-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.qmonix.sdk; /*from w ww. ja v a 2 s.co m*/ /** * Extends timing event so that it would be easier to fire it to the dispatcher. Adds fire() method. */ public class FireableTimingEvent extends TimingEvent { private EventDispatcher dispatcher; /** * Constructs new fireable timing event and associates the specified dispatcher with it. * * @param tag event name. * @param dispatcher event dispatcher that accepts event after fire() is invoked. */ public FireableTimingEvent(String tag, EventDispatcher dispatcher) { super(tag); if (dispatcher == null) { throw new IllegalArgumentException("Event dispatcher cannot be null."); } this.dispatcher = dispatcher; } /** * Stops timing event and submits it to the event dispatcher specified in the constructor. */ public void fire() { this.stop(); this.dispatcher.submit(this); } }