public interface DistributedPropertySet extends PropertySet
PropertySet
that combines properties exposed from multiple
PropertySet
s into one.
This implementation allows one PropertySet
to assemble
all properties exposed from other "satellite" PropertySet
s.
(A satellite may itself be a DistributedPropertySet
, so
in general this can form a tree.)
This is useful for JAX-WS because the properties we expose to the application
are contributed by different pieces, and therefore we'd like each of them
to have a separate PropertySet
implementation that backs up
the properties. For example, this allows FastInfoset to expose its
set of properties to RequestContext
by using a strongly-typed fields.
This is also useful for a client-side transport to expose a bunch of properties
into ResponseContext
. It simply needs to create a PropertySet
object with methods for each property it wants to expose, and then add that
PropertySet
to Packet
. This allows property values to be
lazily computed (when actually asked by users), thus improving the performance
of the typical case where property values are not asked.
A similar benefit applies on the server-side, for a transport to expose
a bunch of properties to WebServiceContext
.
To achieve these benefits, access to DistributedPropertySet
is slower
compared to PropertySet
(such as get/set), while adding a satellite
object is relatively fast.
PropertySet.Property
Modifier and Type | Method and Description |
---|---|
void |
addSatellite(Class<? extends PropertySet> keyClass,
PropertySet satellite) |
void |
addSatellite(PropertySet satellite) |
void |
copySatelliteInto(MessageContext r) |
<T extends PropertySet> |
getSatellite(Class<T> satelliteClass) |
Map<Class<? extends PropertySet>,PropertySet> |
getSatellites() |
void |
removeSatellite(PropertySet satellite) |
asMap, containsKey, createMapView, get, put, remove, supports
@Nullable <T extends PropertySet> T getSatellite(Class<T> satelliteClass)
Map<Class<? extends PropertySet>,PropertySet> getSatellites()
void addSatellite(PropertySet satellite)
void addSatellite(Class<? extends PropertySet> keyClass, PropertySet satellite)
void removeSatellite(PropertySet satellite)
void copySatelliteInto(MessageContext r)
Copyright © 2019 Oracle Corporation. All rights reserved.