Package com.tccc.kos.commons.util.ready
Interface Ready
- All Known Subinterfaces:
FirmwareUpdater
,SerialNumberProvider
- All Known Implementing Classes:
AbstractConfigurable
,AbstractConfigurableService
,AbstractService
,AnalyticsClient
,AnalyticsServer
,ApiClient
,AppService
,AssemblyService
,BaseAppConfig
,BaseDeviceConfig
,BinaryMsgIface
,BinaryMsgSession
,BrokerClient
,BrowserService
,ConfigBean
,ConfigSerialNumberProvider
,ConfigSerialNumberProviderConfig
,ConfigServer
,ConfigService
,CriticalDataSerialNumberProvider
,CriticalDataService
,DeviceService
,ExtensionService
,FirmwareService
,FirmwareUpdatableLink
,FuseService
,HandleService
,HardwareService
,KeyValService
,LocalizationService
,LogService
,ManifestService
,NetworkService
,NodeMgrService
,NodeResolverService
,OTAService
,ReadyBean
,RegionService
,RegionSettings
,RunKosSerialNumberProvider
,SerialService
,SpawnService
,StateService
,StorageService
,TimeService
,TroubleService
,UdevNode
,UdevService
,UpdatableBoard
,UpdateService
public interface Ready
Interface indicating that the implementing bean supports the "ready" protocol.
This allows the implementing bean to be referenced by another bean using the
WhenReady annotation.
For example:
public class MyObj1 implements Ready {
private final ReadyIndicator readyIndicator = new ReadyIndicator();
public void doSomething() {
readyIndicator.setIsReady(true);
}
@Override
public ReadyIndicator getReadyIndicator() {
return readyIndicator;
}
}
public class MyObj2 implements ReadyListener {
@AutoWired
@WhenReady
private MyObj1 myObj1;
@Override
public void onReady() {
executeAllOtherInitCode();
}
}
- Since:
- 1.0
- Version:
- 2022-09-14
-
Method Details
-
getReady
ReadyIndicator getReady()Fetches the associated ready indicator.- Returns:
- the associated
ReadyIndicator
object
-
isReady
default boolean isReady()Indicates if the indicator is ready or not.- Returns:
- true if the indicator is ready.
-
setReady
default void setReady()Call this method to indicate that the object is ready.
-