Interface HandleAware
- All Known Subinterfaces:
ConfigAware<T>,ContextHandleAware
- All Known Implementing Classes:
AbstractConfigurable,AbstractConfigurableService,AbstractService,AnalyticsServer,ApiClient,Application,AppService,Assembly,AssemblyService,Board,BrokerClient,BrowserService,ConfigSerialNumberProvider,ConfigServer,ConfigService,CriticalDataService,Device,DeviceService,ExtensionService,FirmwareService,FuseService,GpioService,HandleService,HardwareService,KeyValService,LocalizationService,LogServer,LogService,ManifestService,NetworkService,NodeMgrService,NodeResolverService,OTAService,RegionService,SerialService,SpawnService,StateBean,StateService,StorageService,SystemApplication,TimeService,TroubleService,UdevService,UiPluginService,UpdatableBoard,UpdateService
public interface HandleAware
Interface for objects that can be identified by a handle. This interface
provides most of the functionality required for making a bean identifiable,
other than allocating the handle itself.
Objects that are HandleAware can be added to other HandleAware
objects as children to form a graph, or path, to the object which uniquely
identifies the object, and forms a key that is used for persistence or
identifying an instance symbolically to an endpoint. The user is responsible
for connecting HandleAware objects into a meaningful graph for
the application.
The handle, while a structured string, is considered opaque and should not be manufactured, parsed, or trimmed.
- Since:
- 1.0
- Version:
- 2022-08-30
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddHandleChild(String prefix, HandleAware child) Adds a childHandleAwarebean to this bean.Returns the handle for this bean.default StringgetName()Returns the name of the handle.default StringgetPath()Returns the path of the bean's handle.
-
Method Details
-
getHandle
Handle getHandle()Returns the handle for this bean. This is used by the context to compute the opaque handle for the object.- Returns:
- the handle node for the bean
-
getPath
Returns the path of the bean's handle. This is the unique identifier for this bean, and is computed by the context during name resolution.- Returns:
- this bean's handle path
-
getName
Returns the name of the handle.- Returns:
- this handle's name
-
addHandleChild
Adds a childHandleAwarebean to this bean. This causes the child to have a path through this bean using the specified prefix. This bean does not maintain a reference to the child, and is only used for logical path construction of handles.
-