Package org.apache.cxf.message
Class MessageImpl
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
org.apache.cxf.message.StringMapImpl
org.apache.cxf.message.MessageImpl
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields inherited from interface org.apache.cxf.message.Message
ACCEPT_CONTENT_TYPE, ASYNC_POST_RESPONSE_DISPATCH, ATTACHMENTS, BASE_PATH, CONNECTION_TIMEOUT, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, DECOUPLED_CHANNEL_MESSAGE, EMPTY_PARTIAL_RESPONSE_MESSAGE, ENCODING, ENDPOINT_ADDRESS, ERROR_MESSAGE, EXCEPTION_CAUSE_SUFFIX, EXCEPTION_MESSAGE_CAUSE_ENABLED, FAULT_IN_INTERCEPTORS, FAULT_OUT_INTERCEPTORS, FAULT_STACKTRACE_ENABLED, FIXED_PARAMETER_ORDER, HTTP_REQUEST_METHOD, IN_INTERCEPTORS, INBOUND_MESSAGE, INTERCEPTOR_PROVIDERS, INVOCATION_CONTEXT, MAINTAIN_SESSION, MIME_HEADERS, MTOM_ENABLED, MTOM_THRESHOLD, ONE_WAY_REQUEST, OUT_INTERCEPTORS, PARTIAL_RESPONSE_MESSAGE, PATH_INFO, PROCESS_202_RESPONSE_ONEWAY_OR_PARTIAL, PROCESS_ONEWAY_RESPONSE, PROPAGATE_202_RESPONSE_ONEWAY_OR_PARTIAL, PROPOGATE_EXCEPTION, PROTOCOL_HEADERS, QUERY_STRING, RECEIVE_TIMEOUT, REQUEST_URI, REQUEST_URL, REQUESTOR_ROLE, RESPONSE_CODE, REST_MESSAGE, ROBUST_ONEWAY, SCHEMA_VALIDATION_ENABLED, SCHEMA_VALIDATION_TYPE, SERVICE_OBJECT, THREAD_CONTEXT_SWITCHED, THREAD_SAFE_STAX_FACTORIES, TRANSPORT, WSDL_DESCRIPTION, WSDL_INTERFACE, WSDL_OPERATION, WSDL_PORT, WSDL_SERVICE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyContent
(Message m1, Message m2) Retrieve any binary attachments associated with the message.<T> T
getContent
(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> void
removeContent
(Class<T> format) Removes a content from a message.void
Resets the cache of contextual properties that messages may contain.void
setAttachments
(Collection<Attachment> attachments) <T> void
setContent
(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)void
void
void
void
Methods inherited from class org.apache.cxf.message.StringMapImpl
get, put, remove
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
MessageImpl
public MessageImpl() -
MessageImpl
public MessageImpl(int initialSize, float factor) -
MessageImpl
-
-
Method Details
-
getAttachments
Description copied from interface:Message
Retrieve any binary attachments associated with the message.- Specified by:
getAttachments
in interfaceMessage
- Returns:
- a collection containing the attachments
-
setAttachments
- Specified by:
setAttachments
in interfaceMessage
-
getAttachmentMimeType
-
getDestination
- Specified by:
getDestination
in interfaceMessage
- Returns:
- the associated Destination if message is inbound, null otherwise
-
getExchange
- Specified by:
getExchange
in interfaceMessage
-
getId
-
getInterceptorChain
Description copied from interface:Message
Returns a live copy of the messages interceptor chain. This is useful when an interceptor wants to modify the interceptor chain on the fly.- Specified by:
getInterceptorChain
in interfaceMessage
- Returns:
- the interceptor chain used to process the message
-
getContent
Description copied from interface:Message
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.- Specified by:
getContent
in interfaceMessage
- Parameters:
format
- the expected content format- Returns:
- the encapsulated content
-
setContent
Description copied from interface:Message
Provide the encapsulated content as a particular type (a result type if message is outbound, a source type if message is inbound)- Specified by:
setContent
in interfaceMessage
- Parameters:
format
- the provided content formatcontent
- the content to be encapsulated
-
removeContent
Description copied from interface:Message
Removes a content from a message. If some contents are completely consumed, removing them is a good idea- Specified by:
removeContent
in interfaceMessage
- Parameters:
format
- the format to remove
-
getContentFormats
- Specified by:
getContentFormats
in interfaceMessage
- Returns:
- the set of currently encapsulated content formats
-
setDestination
-
setExchange
- Specified by:
setExchange
in interfaceMessage
-
setId
-
setInterceptorChain
- Specified by:
setInterceptorChain
in interfaceMessage
-
put
-
getContextualProperty
Description copied from interface:Message
Queries the Message object's metadata for a specific property.- Specified by:
getContextualProperty
in interfaceMessage
- Parameters:
key
- the Message interface's property strings that correlates to the desired property- Returns:
- the property's value
-
getContextualPropertyKeys
- Specified by:
getContextualPropertyKeys
in interfaceMessage
- Returns:
- set of defined contextual property keys
-
copyContent
-
resetContextCache
public void resetContextCache()Description copied from interface:Message
Resets the cache of contextual properties that messages may contain. Subsequent calls to getContextualProperty will likely recalculate the cache.- Specified by:
resetContextCache
in interfaceMessage
-