Package org.apache.cxf.message
Interface Message
- All Known Implementing Classes:
AbstractWrappedMessage,MessageImpl,XMLMessage
The base interface for all all message implementations.
All message objects passed to interceptors use this interface.
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringBoolean property specifying if the server should send the response asynchronously.static final Stringstatic final Stringstatic final Stringstatic final StringContent-Transfer-Encoding used for MTOM attachment binary, base64, etcstatic final Stringstatic final StringBoolean property specifying if this message arrived via a decoupled endpoint.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringA very unique delimiter used for exception with FAULT_STACKTRACE_ENABLED enable, which is easy for client to differentiate the cause and stacktrace when unmarsall a fault messagestatic final StringBoolean property specifying if the name of the exception that caused the Java stack trace is returned.static final Stringstatic final Stringstatic final StringBoolean property specifying if the Java stack trace is returned as a SOAP fault message.static final Stringstatic final Stringstatic final StringSome properties to allow adding interceptors to the chain on a per-request basis.static final StringBoolean property specifying if the message is inbound.static final StringAs above, but Collectionstatic final StringA Map keyed by a string that stores optional context information associated with the invocation that spawned the message.static final Stringstatic final StringA Map containing the MIME headers for a SOAP message.static final StringBoolean property specifying in the runtime is configured to process MTOM attachments.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringBoolean property specifying if 202 response is partial/oneway response.static final StringBoolean property specifying if oneWay response must be processed.static final StringBoolean property specifying if 202 response is partial/oneway response, should it be propagated down to message observers or not.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringBoolean property specifying if the message is a request message.static final Stringstatic final Stringstatic final Stringstatic final StringRuntime schema validation propertystatic final StringThe default values for schema validation will be set in the service model using this propertystatic final StringCurrent Service Objectstatic final StringBoolean property specifying if the thread which runs a request is different to the thread which created this Message.static final StringBoolean property to indicate whether application-defined StAX-factories (stored as contextual property in the message) are thread-safe.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionRetrieve any binary attachments associated with the message.<T> TgetContent(Class<T> format) Retrieve the encapsulated content as a particular type.Queries the Message object's metadata for a specific property.getId()Returns a live copy of the messages interceptor chain.<T> voidremoveContent(Class<T> format) Removes a content from a message.voidResets the cache of contextual properties that messages may contain.voidsetAttachments(Collection<Attachment> attachments) <T> voidsetContent(Class<T> format, Object content) Provide the encapsulated content as a particular type (a result type if message is outbound, a source type if message is inbound)voidsetExchange(Exchange exchange) voidvoidMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Field Details
-
TRANSPORT
- See Also:
-
REST_MESSAGE
- See Also:
-
REQUESTOR_ROLE
Boolean property specifying if the message is a request message.- See Also:
-
INBOUND_MESSAGE
Boolean property specifying if the message is inbound.- See Also:
-
INVOCATION_CONTEXT
A Map keyed by a string that stores optional context information associated with the invocation that spawned the message.- See Also:
-
SERVICE_OBJECT
Current Service Object- See Also:
-
MIME_HEADERS
A Map containing the MIME headers for a SOAP message.- See Also:
-
ASYNC_POST_RESPONSE_DISPATCH
Boolean property specifying if the server should send the response asynchronously.- See Also:
-
DECOUPLED_CHANNEL_MESSAGE
Boolean property specifying if this message arrived via a decoupled endpoint.- See Also:
-
PARTIAL_RESPONSE_MESSAGE
- See Also:
-
EMPTY_PARTIAL_RESPONSE_MESSAGE
- See Also:
-
ONE_WAY_REQUEST
- See Also:
-
PROCESS_ONEWAY_RESPONSE
Boolean property specifying if oneWay response must be processed.- See Also:
-
PROCESS_202_RESPONSE_ONEWAY_OR_PARTIAL
Boolean property specifying if 202 response is partial/oneway response. Default value is true- See Also:
-
PROPAGATE_202_RESPONSE_ONEWAY_OR_PARTIAL
Boolean property specifying if 202 response is partial/oneway response, should it be propagated down to message observers or not. Default value is false.- See Also:
-
THREAD_CONTEXT_SWITCHED
Boolean property specifying if the thread which runs a request is different to the thread which created this Message.- See Also:
-
ROBUST_ONEWAY
- See Also:
-
HTTP_REQUEST_METHOD
- See Also:
-
REQUEST_URI
- See Also:
-
REQUEST_URL
- See Also:
-
PROTOCOL_HEADERS
-
RESPONSE_CODE
-
ERROR_MESSAGE
-
ENDPOINT_ADDRESS
-
PATH_INFO
-
QUERY_STRING
-
PROPOGATE_EXCEPTION
-
MTOM_ENABLED
Boolean property specifying in the runtime is configured to process MTOM attachments.- See Also:
-
MTOM_THRESHOLD
- See Also:
-
SCHEMA_VALIDATION_ENABLED
Runtime schema validation property- See Also:
-
SCHEMA_VALIDATION_TYPE
The default values for schema validation will be set in the service model using this property- See Also:
-
FAULT_STACKTRACE_ENABLED
Boolean property specifying if the Java stack trace is returned as a SOAP fault message.- See Also:
-
EXCEPTION_MESSAGE_CAUSE_ENABLED
Boolean property specifying if the name of the exception that caused the Java stack trace is returned.- See Also:
-
EXCEPTION_CAUSE_SUFFIX
A very unique delimiter used for exception with FAULT_STACKTRACE_ENABLED enable, which is easy for client to differentiate the cause and stacktrace when unmarsall a fault message- See Also:
-
CONTENT_TYPE
- See Also:
-
ACCEPT_CONTENT_TYPE
- See Also:
-
BASE_PATH
-
ENCODING
-
FIXED_PARAMETER_ORDER
-
MAINTAIN_SESSION
-
ATTACHMENTS
-
WSDL_DESCRIPTION
- See Also:
-
WSDL_SERVICE
- See Also:
-
WSDL_PORT
- See Also:
-
WSDL_INTERFACE
- See Also:
-
WSDL_OPERATION
- See Also:
-
IN_INTERCEPTORS
Some properties to allow adding interceptors to the chain on a per-request basis. All are a CollectionThese are NOT contextual properties (ie: not searched outside the message). They must exist on the message itself at time of Chain creation -
OUT_INTERCEPTORS
-
FAULT_IN_INTERCEPTORS
-
FAULT_OUT_INTERCEPTORS
-
INTERCEPTOR_PROVIDERS
As above, but Collection -
CONTENT_TRANSFER_ENCODING
Content-Transfer-Encoding used for MTOM attachment binary, base64, etc -
CONNECTION_TIMEOUT
- See Also:
-
RECEIVE_TIMEOUT
- See Also:
-
THREAD_SAFE_STAX_FACTORIES
Boolean property to indicate whether application-defined StAX-factories (stored as contextual property in the message) are thread-safe. If set totrue, CXF doesn't synchronize accesses to the factories.
-
-
Method Details
-
getId
String getId() -
setId
-
getInterceptorChain
InterceptorChain getInterceptorChain()Returns a live copy of the messages interceptor chain. This is useful when an interceptor wants to modify the interceptor chain on the fly.- Returns:
- the interceptor chain used to process the message
-
setInterceptorChain
-
getDestination
Destination getDestination()- Returns:
- the associated Destination if message is inbound, null otherwise
-
getExchange
Exchange getExchange() -
setExchange
-
getAttachments
Collection<Attachment> getAttachments()Retrieve any binary attachments associated with the message.- Returns:
- a collection containing the attachments
-
setAttachments
-
getContent
Retrieve the encapsulated content as a particular type. The content is available as a result type if the message is outbound. The content is available as a source type if message is inbound. If the content is not available as the specified type null is returned.- Parameters:
format- the expected content format- Returns:
- the encapsulated content
-
setContent
Provide the encapsulated content as a particular type (a result type if message is outbound, a source type if message is inbound)- Parameters:
format- the provided content formatcontent- the content to be encapsulated
-
getContentFormats
- Returns:
- the set of currently encapsulated content formats
-
removeContent
Removes a content from a message. If some contents are completely consumed, removing them is a good idea- Parameters:
format- the format to remove
-
getContextualProperty
Queries the Message object's metadata for a specific property.- Parameters:
key- the Message interface's property strings that correlates to the desired property- Returns:
- the property's value
-
resetContextCache
void resetContextCache()Resets the cache of contextual properties that messages may contain. Subsequent calls to getContextualProperty will likely recalculate the cache. -
getContextualPropertyKeys
- Returns:
- set of defined contextual property keys
-