Interface Actionable
-
- All Known Implementing Classes:
ActionableTest,Blinker,Blinker,BlueRS,BlueRSCmdInt,BlueRSCmdIntDemo,BlueRSDemo,CAN1Test,DateTime,EPOStest1,ExceptionDemo,FileTransfer,FlinkDemo,FlinkDemo,HD44780U,HD44780U,HLC1395Demo,HLC1395Pulsed,MotorDemo,MotorDemo1,RN131,RN131,Robi2,Robi2LedBlinkerDemo,Robi2LineTask,Robi2MotorDemo,Robi2ObstacleTask,Robi2SensorProximityDemo_Led,Robi2SensorProximityDemo_Out,SimpleBlinkerDemo,SimpleBlinkerDemo,SPIDemo,SystemInOutReflector,SystemInOutReflector,SystemOutDemo,SystemOutDemo1,SystemOutDemo2,Task,Task,TCRT1000,TCRT1000Demo,UART3Demo,UART3InOutReflector,UART6Demo,VL53L0X,VL53L0XDemo,VL53L0XTest,WatchdogDemo,WatchdogTask,WifiDemo,WifiDemo
public interface ActionableTheActionableinterface should be implemented by any class whose instances are intended to be executed by a task. The class must define a method of no arguments calledaction.This interface is designed to provide a common protocol for objects that wish to execute code while they are active. For example,
Actionableis implemented by classTask. Being active simply means that a task has been started and has not yet been stopped.In addition,
Actionableprovides the means for a class to be active while not subclassingTask. A class that implementsActionablecan run without subclassingTaskby instantiating aTaskinstance and passing itself in as the target. In most cases, theActionableinterface should be used if you are only planning to override theaction()method and no otherTaskmethods. This is important because classes should not be subclassed unless the programmer intends on modifying or enhancing the fundamental behavior of the class.- Author:
- Urs Graf
- See Also:
Task
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaction()When an object implementing interfaceActionableis used to create a task, starting the task causes the object'sactionmethod to be called in that separately executing action.
-