Android Open Source - security-cam Controller State






From Project

Back to project page security-cam.

License

The source code is released under:

MIT License

If you think the Android project security-cam 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 berlin.reiche.securitas.controller.states;
//w  w w  . j a  va  2s  . c  o m
import android.os.Message;
import berlin.reiche.securitas.controller.Controller;
import berlin.reiche.securitas.model.Model;

/**
 * The controller state specifies, how the controller is reacting on certain
 * messages.
 * 
 * @author Konrad Reiche
 * 
 */
public abstract class ControllerState<T extends Enum<T>> {

  /**
   * Reference on the model.
   */
  protected final Model<T> model;

  /**
   * Reference on the controller.
   */
  protected final Controller<T> controller;

  /**
   * Default constructor.
   * 
   * @param controller
   *            controller to which this state belongs.
   */
  public ControllerState(Controller<T> controller) {
    this.controller = controller;
    this.model = controller.getModel();
  }

  /**
   * Handles the incoming message. When subclassing {@link ControllerState}
   * this method has to be overridden in order to specify the actual behavior.
   * 
   * @param msg
   *            the received message.
   */
  public abstract void handleMessage(Message msg);
}




Java Source Code List

berlin.reiche.securitas.Client.java
berlin.reiche.securitas.Settings.java
berlin.reiche.securitas.activities.Action.java
berlin.reiche.securitas.activities.LauncherActivity.java
berlin.reiche.securitas.activities.MainActivity.java
berlin.reiche.securitas.activities.SettingsActivity.java
berlin.reiche.securitas.activities.package-info.java
berlin.reiche.securitas.controller.ClientController.java
berlin.reiche.securitas.controller.Controller.java
berlin.reiche.securitas.controller.GCMIntentService.java
berlin.reiche.securitas.controller.GCMReceiver.java
berlin.reiche.securitas.controller.InboxHandler.java
berlin.reiche.securitas.controller.states.ControllerState.java
berlin.reiche.securitas.controller.states.DetectionState.java
berlin.reiche.securitas.controller.states.IdleState.java
berlin.reiche.securitas.controller.states.package-info.java
berlin.reiche.securitas.controller.tasks.BitmapDownloadTask.java
berlin.reiche.securitas.controller.tasks.DetectionRequest.java
berlin.reiche.securitas.controller.tasks.DeviceRegistration.java
berlin.reiche.securitas.controller.tasks.StatusTask.java
berlin.reiche.securitas.controller.tasks.package-info.java
berlin.reiche.securitas.controller.package-info.java
berlin.reiche.securitas.model.ClientModel.java
berlin.reiche.securitas.model.Model.java
berlin.reiche.securitas.model.Protocol.java
berlin.reiche.securitas.model.package-info.java
berlin.reiche.securitas.util.FlushedInputStream.java
berlin.reiche.securitas.util.HttpUtilities.java
berlin.reiche.securitas.util.NotificationDialog.java
berlin.reiche.securitas.util.package-info.java
berlin.reiche.securitas.package-info.java