A {@code Wire} object connects a Producer service to a Consumer service. Boththe Producer and Consumer services are identified by their unique {@code service.pid} values. The Producer and Consumer services maycommunicate with each other via {@code Wire} objects that connect them. TheProducer service may send updated values to the Consumer service by calling the {@link #update(Object)} method. The Consumer service may request anupdated value from the Producer service by calling the {@link #poll()}method.
A Producer service and a Consumer service may be connected through multiple {@code Wire} objects.
Security Considerations. {@code Wire} objects are available to Producer andConsumer services connected to a given {@code Wire} object and to bundleswhich can access the {@code WireAdmin} service. A bundle must have{@code ServicePermission[WireAdmin,GET]} to get the {@code WireAdmin} serviceto access all {@code Wire} objects. A bundle registering a Producer serviceor a Consumer service must have the appropriate {@code ServicePermission[Consumer|Producer,REGISTER]} to register the serviceand will be passed {@code Wire} objects when the service object's{@code consumersConnected} or {@code producersConnected} method is called.
Scope. Each Wire object can have a scope set with the {@code setScope}method. This method should be called by a Consumer service when it assumes a Producer service that is composite (supports multiple information items). The names in the scope must be verified by the {@code Wire} object before it isused in communication. The semantics of the names depend on the Producer service and must not be interpreted by the Wire Admin service. @noimplement @author $Id: de75c27d506f78112bce8a5289137ba5c0874344 $
|
|
|
|
|
|