Android Open Source - client-android Fireable Timing Event






From Project

Back to project page client-android.

License

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.

Java Source Code

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);
  }

}




Java Source Code List

com.qmonix.sample.basic.MainActivity.java
com.qmonix.sdk.EventDispatchHandler.java
com.qmonix.sdk.EventDispatcher.java
com.qmonix.sdk.EventMessage.java
com.qmonix.sdk.Event.java
com.qmonix.sdk.FireableTimingEvent.java
com.qmonix.sdk.HttpEventDispatcher.java
com.qmonix.sdk.LogEventDispatcher.java
com.qmonix.sdk.QLog.java
com.qmonix.sdk.TimingEvent.java
com.qmonix.sdk.Tracker.java
com.qmonix.sdk.VolumeEvent.java
com.qmonix.sdk.helpers.HttpHelper.java
com.qmonix.sdk.helpers.exceptions.HttpHelperException.java
com.qmonix.sdk.utils.AsyncTaskResult.java
com.qmonix.sdk.utils.Utils.java