- All Implemented Interfaces:
DistributedPropertySet
,PropertySet
- Direct Known Subclasses:
Packet
,RequestContext
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.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.webservices.api.message.BasePropertySet
BasePropertySet.Accessor, BasePropertySet.PropertyMap, BasePropertySet.PropertyMapEntry
Nested classes/interfaces inherited from interface com.oracle.webservices.api.message.PropertySet
PropertySet.Property
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSatellite
(PropertySet satellite) void
addSatellite
(Class<? extends PropertySet> keyClass, PropertySet satellite) boolean
containsKey
(Object key) void
void
protected void
createEntrySet
(Set<Map.Entry<String, Object>> core) Gets the name of the property.<T extends PropertySet>
TgetSatellite
(Class<T> satelliteClass) Map<Class<? extends PropertySet>,
PropertySet> Sets a property.void
removeSatellite
(PropertySet satellite) boolean
Checks if thisPropertySet
supports a property of the given name.protected boolean
supportsLocal
(Object key) Methods inherited from class com.oracle.webservices.api.message.BasePropertySet
asMap, getPropertyMap, mapAllowsAdditionalProperties, parse, parse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.oracle.webservices.api.message.PropertySet
asMap
-
Constructor Details
-
BaseDistributedPropertySet
public BaseDistributedPropertySet()
-
-
Method Details
-
addSatellite
- Specified by:
addSatellite
in interfaceDistributedPropertySet
-
addSatellite
public void addSatellite(@NotNull Class<? extends PropertySet> keyClass, @NotNull PropertySet satellite) - Specified by:
addSatellite
in interfaceDistributedPropertySet
-
removeSatellite
- Specified by:
removeSatellite
in interfaceDistributedPropertySet
-
copySatelliteInto
-
copySatelliteInto
- Specified by:
copySatelliteInto
in interfaceDistributedPropertySet
-
getSatellite
- Specified by:
getSatellite
in interfaceDistributedPropertySet
-
getSatellites
- Specified by:
getSatellites
in interfaceDistributedPropertySet
-
get
Description copied from class:BasePropertySet
Gets the name of the property.- Specified by:
get
in interfacePropertySet
- Overrides:
get
in classBasePropertySet
- Parameters:
key
- This field is typed asObject
to follow theMap.get(Object)
convention, but if anything butString
is passed, this method just returns null.
-
put
Description copied from class:BasePropertySet
Sets a property.Implementation Note
This method is slow. Code inside JAX-WS should define strongly-typed fields in this class and access them directly, instead of using this.
- Specified by:
put
in interfacePropertySet
- Overrides:
put
in classBasePropertySet
- See Also:
-
containsKey
- Specified by:
containsKey
in interfacePropertySet
- Overrides:
containsKey
in classBasePropertySet
-
supports
Description copied from class:BasePropertySet
Checks if thisPropertySet
supports a property of the given name.- Specified by:
supports
in interfacePropertySet
- Overrides:
supports
in classBasePropertySet
-
remove
- Specified by:
remove
in interfacePropertySet
- Overrides:
remove
in classBasePropertySet
-
createEntrySet
- Overrides:
createEntrySet
in classBasePropertySet
-
asMapLocal
-
supportsLocal
-
createView
- Overrides:
createView
in classBasePropertySet
-