A packet can be thought of as a frame/envelope/package that wraps a {@link Message}. A packet keeps track of optional metadata (properties) about a {@link Message} that doesn't go across the wire.This roughly corresponds to {@link MessageContext} in the JAX-WS API.
Usually a packet contains a {@link Message} in it, but sometimes(such as for a reply of an one-way operation), a packet may float around without a {@link Message} in it.
Information frequently used inside the JAX-WS RI is stored in the strongly-typed fields. Other information is stored in terms of a generic {@link Map} (see{@link #invocationProperties}.)
Some properties need to be retained between request and response, some don't. For strongly typed fields, this characteristic is statically known for each of them, and propagation happens accordingly. For generic information stored in {@link Map}, {@link #invocationProperties}stores per-invocation scope information (which carries over to the response.)
This object is used as the backing store of {@link MessageContext}, and {@link LogicalMessageContext} and {@link SOAPMessageContext} willbe delegating to this object for storing/retrieving values.
{@link BindingProvider#getRequestContext() Request context} is used toseed the initial values of {@link Packet}. Some of those values go to strongly-typed fields, and others go to {@link #invocationProperties}, as they need to be retained in the reply message.
Similarly, {@link BindingProvider#getResponseContext() response context}is constructed from {@link Packet} (or rather it's just a view of {@link Packet}.) by using properties from {@link #invocationProperties}, modulo properties named explicitly in {@link #getHandlerScopePropertyNames(boolean)}. IOW, properties added to {@link #invocationProperties}are exposed to the response context by default.
|
|
|
|