public interface Envelope
Envelopeobject combines a status value, an identification object and a scope name. The
Envelopeobject allows the use of standard Java types when a Producer service can produce more than one kind of object. The
Envelopeobject allows the Consumer service to recognize the kind of object that is received. For example, a door lock could be represented by a
Booleanobject. If the
Producerservice would send such a
Booleanobject, then the Consumer service would not know what door the
Booleanobject represented. The
Envelopeobject contains an identification object so the Consumer service can discriminate between different kinds of values. The identification object may be a simple
Stringobject, but it can also be a domain specific object that is mutually agreed by the Producer and the Consumer service. This object can then contain relevant information that makes the identification easier.
The scope name of the envelope is used for security. The Wire object must
verify that any
Envelope object send through the
method or coming from the
poll method has a scope name that matches
the permissions of both the Producer service and the Consumer service
involved. The wireadmin package also contains a class
that implements the methods of this interface.
|Modifier and Type||Method and Description|
Return the identification of this
Return the scope name of this
Return the value associated with this
nullwhen no item is associated with this object.
Envelopeobject. An identification may be of any Java type. The type must be mutually agreed between the Consumer and Producer services.
Envelopeobject. Scope names are used to restrict the communication between the Producer and Consumer services. Only
Envelopesobjects with a scope name that is permitted for the Producer and the Consumer services must be passed through a
Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0