Interface HandleAware
- All Known Subinterfaces:
ConfigAware<T>,ContextHandleAware
- All Known Implementing Classes:
AbstractConfigurable,AbstractConfigurableService,AbstractService,ApiClient,Application,Assembly,AssemblyDevice,Board,BrokerClient,ConfigSerialNumberProvider,ConfigServer,Device,LogServer,MimeTypeService,StateBean,SystemApplication,UpdatableBoard
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
- Version:
- 1
-
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
- Since:
- 1
-
getName
Returns the name of the handle.- Returns:
- this handle's name
- Since:
- 1
-
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.- Since:
- 1
-