|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.oracle.webservices.api.message.BasePropertySet
com.oracle.webservices.api.message.BaseDistributedPropertySet
com.sun.xml.ws.client.RequestContext
public final class RequestContext
Request context implementation.
The JAX-WS spec exposes properties as a Map
, but if we just use
an ordinary HashMap
for this, it doesn't work as fast as we'd like
it to be. Hence we have this class.
We expect the user to set a few properties and then use that same setting to make a bunch of invocations. So we'd like to take some hit when the user actually sets a property to do some computation, then use that computed value during a method invocation again and again.
For this goal, we use PropertySet
and implement some properties
as virtual properties backed by methods. This allows us to do the computation
in the setter, and store it in a field.
These fields are used by Stub.process(com.sun.xml.ws.api.message.Packet, com.sun.xml.ws.client.RequestContext, com.sun.xml.ws.client.ResponseContextReceiver)
to populate a Packet
.
For better performance, we wan't use strongly typed field as much as possible
to avoid reflection and unnecessary collection iterations;
Using BasePropertySet.MapView
implementation allows client to use Map
interface
in a way that all the strongly typed properties are reflected to the fields
right away. Any additional (extending) properties can be added by client as well;
those would be processed using iterating the MapView
and their processing,
of course, would be slower.
The previous implementation with fallback mode has been removed to simplify the code and remove the bugs.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.oracle.webservices.api.message.BasePropertySet |
---|
com.oracle.webservices.api.message.BasePropertySet.Accessor, com.oracle.webservices.api.message.BasePropertySet.PropertyMap, com.oracle.webservices.api.message.BasePropertySet.PropertyMapEntry |
Nested classes/interfaces inherited from interface com.oracle.webservices.api.message.PropertySet |
---|
com.oracle.webservices.api.message.PropertySet.Property |
Field Summary | |
---|---|
ContentNegotiation |
contentNegotiation
The value of ContentNegotiation.PROPERTY
property. |
Method Summary | |
---|---|
void |
addSatellite(PropertySet satellite)
Deprecated. |
RequestContext |
copy()
|
void |
fill(Packet packet,
boolean isAddressingEnabled)
Fill a Packet with values of this RequestContext . |
java.lang.Object |
get(java.lang.Object key)
The efficient get method that reads from RequestContext . |
java.lang.String |
getContentNegotiationString()
|
EndpointAddress |
getEndpointAddress()
|
java.lang.String |
getEndPointAddressString()
Deprecated. always access endpointAddress . |
protected com.oracle.webservices.api.message.BasePropertySet.PropertyMap |
getPropertyMap()
Map representing the Fields and Methods annotated with PropertySet.Property . |
java.lang.String |
getSoapAction()
|
java.lang.Boolean |
getSoapActionUse()
|
protected boolean |
mapAllowsAdditionalProperties()
Used when constructing the MapView for this object - it controls if the MapView servers only to
access strongly typed values or allows also different values |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
The efficient put method that updates RequestContext . |
void |
setContentNegotiationString(java.lang.String s)
|
void |
setEndpointAddress(EndpointAddress epa)
|
void |
setEndPointAddressString(java.lang.String s)
|
void |
setSoapAction(java.lang.String sAction)
|
void |
setSoapActionUse(java.lang.Boolean sActionUse)
|
Methods inherited from class com.oracle.webservices.api.message.BaseDistributedPropertySet |
---|
addSatellite, addSatellite, asMapLocal, containsKey, copySatelliteInto, copySatelliteInto, createEntrySet, createView, getSatellite, getSatellites, remove, removeSatellite, supports, supportsLocal |
Methods inherited from class com.oracle.webservices.api.message.BasePropertySet |
---|
asMap, createMapView, 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, createMapView |
Field Detail |
---|
public ContentNegotiation contentNegotiation
ContentNegotiation.PROPERTY
property.
Method Detail |
---|
public void addSatellite(@NotNull PropertySet satellite)
public java.lang.String getEndPointAddressString()
endpointAddress
.
BindingProvider.ENDPOINT_ADDRESS_PROPERTY
view
on top of endpointAddress
.
public void setEndPointAddressString(java.lang.String s)
public void setEndpointAddress(@NotNull EndpointAddress epa)
@NotNull public EndpointAddress getEndpointAddress()
public java.lang.String getContentNegotiationString()
public void setContentNegotiationString(java.lang.String s)
public java.lang.String getSoapAction()
public void setSoapAction(java.lang.String sAction)
public java.lang.Boolean getSoapActionUse()
public void setSoapActionUse(java.lang.Boolean sActionUse)
public java.lang.Object get(java.lang.Object key)
RequestContext
.
get
in interface com.oracle.webservices.api.message.PropertySet
get
in class com.oracle.webservices.api.message.BaseDistributedPropertySet
key
- This field is typed as Object
to follow the HashMap.get(Object)
convention, but if anything but String
is passed, this method
just returns null.public java.lang.Object put(java.lang.String key, java.lang.Object value)
RequestContext
.
put
in interface com.oracle.webservices.api.message.PropertySet
put
in class com.oracle.webservices.api.message.BaseDistributedPropertySet
Property
public void fill(Packet packet, boolean isAddressingEnabled)
Packet
with values of this RequestContext
.
packet
- to be filled with context valuesisAddressingEnabled
- flag if addressing enabled (to provide warning if necessary)public RequestContext copy()
protected com.oracle.webservices.api.message.BasePropertySet.PropertyMap getPropertyMap()
com.oracle.webservices.api.message.BasePropertySet
PropertySet.Property
.
Model of PropertySet
class.
At the end of the derivation chain this method just needs to be implemented as:
private static final PropertyMap model; static { model = parse(MyDerivedClass.class); } protected PropertyMap getPropertyMap() { return model; }
getPropertyMap
in class com.oracle.webservices.api.message.BasePropertySet
protected boolean mapAllowsAdditionalProperties()
com.oracle.webservices.api.message.BasePropertySet
MapView
for this object - it controls if the MapView
servers only to
access strongly typed values or allows also different values
mapAllowsAdditionalProperties
in class com.oracle.webservices.api.message.BasePropertySet
BasePropertySet.PropertyMap
should allow also properties not defined as strongly typed fields
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |