Back to project page security-cam.
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.
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); }