Package org.apache.cxf.message
Interface Message
- 
- All Known Implementing Classes:
- AbstractWrappedMessage,- MessageImpl,- XMLMessage
 
 public interface Message extends StringMap The base interface for all all message implementations. All message objects passed to interceptors use this interface.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringACCEPT_CONTENT_TYPEstatic StringASYNC_POST_RESPONSE_DISPATCHBoolean property specifying if the server should send the response asynchronously.static StringATTACHMENTSstatic StringBASE_PATHstatic StringCONNECTION_TIMEOUTstatic StringCONTENT_TRANSFER_ENCODINGContent-Transfer-Encoding used for MTOM attachment binary, base64, etcstatic StringCONTENT_TYPEstatic StringDECOUPLED_CHANNEL_MESSAGEBoolean property specifying if this message arrived via a decoupled endpoint.static StringEMPTY_PARTIAL_RESPONSE_MESSAGEstatic StringENCODINGstatic StringENDPOINT_ADDRESSstatic StringERROR_MESSAGEstatic StringEXCEPTION_CAUSE_SUFFIXA 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 StringEXCEPTION_MESSAGE_CAUSE_ENABLEDBoolean property specifying if the name of the exception that caused the Java stack trace is returned.static StringFAULT_IN_INTERCEPTORSstatic StringFAULT_OUT_INTERCEPTORSstatic StringFAULT_STACKTRACE_ENABLEDBoolean property specifying if the Java stack trace is returned as a SOAP fault message.static StringFIXED_PARAMETER_ORDERstatic StringHTTP_REQUEST_METHODstatic StringIN_INTERCEPTORSSome properties to allow adding interceptors to the chain on a per-request basis.static StringINBOUND_MESSAGEBoolean property specifying if the message is inbound.static StringINTERCEPTOR_PROVIDERSAs above, but Collectionstatic StringINVOCATION_CONTEXTA Map keyed by a string that stores optional context information associated with the invocation that spawned the message.static StringMAINTAIN_SESSIONstatic StringMIME_HEADERSA Map containing the MIME headers for a SOAP message.static StringMTOM_ENABLEDBoolean property specifying in the runtime is configured to process MTOM attachments.static StringMTOM_THRESHOLDstatic StringONE_WAY_REQUESTstatic StringOUT_INTERCEPTORSstatic StringPARTIAL_RESPONSE_MESSAGEstatic StringPATH_INFOstatic StringPROCESS_202_RESPONSE_ONEWAY_OR_PARTIALBoolean property specifying if 202 response is partial/oneway response.static StringPROCESS_ONEWAY_RESPONSEBoolean property specifying if oneWay response must be processed.static StringPROPAGATE_202_RESPONSE_ONEWAY_OR_PARTIALBoolean property specifying if 202 response is partial/oneway response, should it be propagated down to message observers or not.static StringPROPOGATE_EXCEPTIONstatic StringPROTOCOL_HEADERSstatic StringQUERY_STRINGstatic StringRECEIVE_TIMEOUTstatic StringREQUEST_URIstatic StringREQUEST_URLstatic StringREQUESTOR_ROLEBoolean property specifying if the message is a request message.static StringRESPONSE_CODEstatic StringREST_MESSAGEstatic StringROBUST_ONEWAYstatic StringSCHEMA_VALIDATION_ENABLEDRuntime schema validation propertystatic StringSCHEMA_VALIDATION_TYPEThe default values for schema validation will be set in the service model using this propertystatic StringSERVICE_OBJECTCurrent Service Objectstatic StringTHREAD_CONTEXT_SWITCHEDBoolean property specifying if the thread which runs a request is different to the thread which created this Message.static StringTHREAD_SAFE_STAX_FACTORIESBoolean property to indicate whether application-defined StAX-factories (stored as contextual property in the message) are thread-safe.static StringTRANSPORTstatic StringWSDL_DESCRIPTIONstatic StringWSDL_INTERFACEstatic StringWSDL_OPERATIONstatic StringWSDL_PORTstatic StringWSDL_SERVICE
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<Attachment>getAttachments()Retrieve any binary attachments associated with the message.<T> TgetContent(Class<T> format)Retrieve the encapsulated content as a particular type.Set<Class<?>>getContentFormats()ObjectgetContextualProperty(String key)Queries the Message object's metadata for a specific property.Set<String>getContextualPropertyKeys()DestinationgetDestination()ExchangegetExchange()StringgetId()InterceptorChaingetInterceptorChain()Returns a live copy of the messages interceptor chain.<T> voidremoveContent(Class<T> format)Removes a content from a message.voidresetContextCache()Resets 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)voidsetId(String id)voidsetInterceptorChain(InterceptorChain chain)- 
Methods inherited from interface java.util.Mapclear, 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 Detail- 
TRANSPORTstatic final String TRANSPORT - See Also:
- Constant Field Values
 
 - 
REST_MESSAGEstatic final String REST_MESSAGE - See Also:
- Constant Field Values
 
 - 
REQUESTOR_ROLEstatic final String REQUESTOR_ROLE Boolean property specifying if the message is a request message.- See Also:
- Constant Field Values
 
 - 
INBOUND_MESSAGEstatic final String INBOUND_MESSAGE Boolean property specifying if the message is inbound.- See Also:
- Constant Field Values
 
 - 
INVOCATION_CONTEXTstatic final String INVOCATION_CONTEXT A Map keyed by a string that stores optional context information associated with the invocation that spawned the message.- See Also:
- Constant Field Values
 
 - 
SERVICE_OBJECTstatic final String SERVICE_OBJECT Current Service Object- See Also:
- Constant Field Values
 
 - 
MIME_HEADERSstatic final String MIME_HEADERS A Map containing the MIME headers for a SOAP message.- See Also:
- Constant Field Values
 
 - 
ASYNC_POST_RESPONSE_DISPATCHstatic final String ASYNC_POST_RESPONSE_DISPATCH Boolean property specifying if the server should send the response asynchronously.- See Also:
- Constant Field Values
 
 - 
DECOUPLED_CHANNEL_MESSAGEstatic final String DECOUPLED_CHANNEL_MESSAGE Boolean property specifying if this message arrived via a decoupled endpoint.- See Also:
- Constant Field Values
 
 - 
PARTIAL_RESPONSE_MESSAGEstatic final String PARTIAL_RESPONSE_MESSAGE - See Also:
- Constant Field Values
 
 - 
EMPTY_PARTIAL_RESPONSE_MESSAGEstatic final String EMPTY_PARTIAL_RESPONSE_MESSAGE - See Also:
- Constant Field Values
 
 - 
ONE_WAY_REQUESTstatic final String ONE_WAY_REQUEST - See Also:
- Constant Field Values
 
 - 
PROCESS_ONEWAY_RESPONSEstatic final String PROCESS_ONEWAY_RESPONSE Boolean property specifying if oneWay response must be processed.- See Also:
- Constant Field Values
 
 - 
PROCESS_202_RESPONSE_ONEWAY_OR_PARTIALstatic final String PROCESS_202_RESPONSE_ONEWAY_OR_PARTIAL Boolean property specifying if 202 response is partial/oneway response. Default value is true- See Also:
- Constant Field Values
 
 - 
PROPAGATE_202_RESPONSE_ONEWAY_OR_PARTIALstatic final String 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:
- Constant Field Values
 
 - 
THREAD_CONTEXT_SWITCHEDstatic final String THREAD_CONTEXT_SWITCHED Boolean property specifying if the thread which runs a request is different to the thread which created this Message.- See Also:
- Constant Field Values
 
 - 
ROBUST_ONEWAYstatic final String ROBUST_ONEWAY - See Also:
- Constant Field Values
 
 - 
HTTP_REQUEST_METHODstatic final String HTTP_REQUEST_METHOD - See Also:
- Constant Field Values
 
 - 
REQUEST_URIstatic final String REQUEST_URI - See Also:
- Constant Field Values
 
 - 
REQUEST_URLstatic final String REQUEST_URL - See Also:
- Constant Field Values
 
 - 
PROTOCOL_HEADERSstatic final String PROTOCOL_HEADERS 
 - 
RESPONSE_CODEstatic final String RESPONSE_CODE 
 - 
ERROR_MESSAGEstatic final String ERROR_MESSAGE 
 - 
ENDPOINT_ADDRESSstatic final String ENDPOINT_ADDRESS 
 - 
PATH_INFOstatic final String PATH_INFO 
 - 
QUERY_STRINGstatic final String QUERY_STRING 
 - 
PROPOGATE_EXCEPTIONstatic final String PROPOGATE_EXCEPTION 
 - 
MTOM_ENABLEDstatic final String MTOM_ENABLED Boolean property specifying in the runtime is configured to process MTOM attachments.- See Also:
- Constant Field Values
 
 - 
MTOM_THRESHOLDstatic final String MTOM_THRESHOLD - See Also:
- Constant Field Values
 
 - 
SCHEMA_VALIDATION_ENABLEDstatic final String SCHEMA_VALIDATION_ENABLED Runtime schema validation property- See Also:
- Constant Field Values
 
 - 
SCHEMA_VALIDATION_TYPEstatic final String SCHEMA_VALIDATION_TYPE The default values for schema validation will be set in the service model using this property- See Also:
- Constant Field Values
 
 - 
FAULT_STACKTRACE_ENABLEDstatic final String FAULT_STACKTRACE_ENABLED Boolean property specifying if the Java stack trace is returned as a SOAP fault message.- See Also:
- Constant Field Values
 
 - 
EXCEPTION_MESSAGE_CAUSE_ENABLEDstatic final String EXCEPTION_MESSAGE_CAUSE_ENABLED Boolean property specifying if the name of the exception that caused the Java stack trace is returned.- See Also:
- Constant Field Values
 
 - 
EXCEPTION_CAUSE_SUFFIXstatic final String 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:
- Constant Field Values
 
 - 
CONTENT_TYPEstatic final String CONTENT_TYPE - See Also:
- Constant Field Values
 
 - 
ACCEPT_CONTENT_TYPEstatic final String ACCEPT_CONTENT_TYPE - See Also:
- Constant Field Values
 
 - 
BASE_PATHstatic final String BASE_PATH 
 - 
ENCODINGstatic final String ENCODING 
 - 
FIXED_PARAMETER_ORDERstatic final String FIXED_PARAMETER_ORDER 
 - 
MAINTAIN_SESSIONstatic final String MAINTAIN_SESSION 
 - 
ATTACHMENTSstatic final String ATTACHMENTS 
 - 
WSDL_DESCRIPTIONstatic final String WSDL_DESCRIPTION - See Also:
- Constant Field Values
 
 - 
WSDL_SERVICEstatic final String WSDL_SERVICE - See Also:
- Constant Field Values
 
 - 
WSDL_PORTstatic final String WSDL_PORT - See Also:
- Constant Field Values
 
 - 
WSDL_INTERFACEstatic final String WSDL_INTERFACE - See Also:
- Constant Field Values
 
 - 
WSDL_OPERATIONstatic final String WSDL_OPERATION - See Also:
- Constant Field Values
 
 - 
IN_INTERCEPTORSstatic final String 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_INTERCEPTORSstatic final String OUT_INTERCEPTORS 
 - 
FAULT_IN_INTERCEPTORSstatic final String FAULT_IN_INTERCEPTORS 
 - 
FAULT_OUT_INTERCEPTORSstatic final String FAULT_OUT_INTERCEPTORS 
 - 
INTERCEPTOR_PROVIDERSstatic final String INTERCEPTOR_PROVIDERS As above, but Collection
 - 
CONTENT_TRANSFER_ENCODINGstatic final String CONTENT_TRANSFER_ENCODING Content-Transfer-Encoding used for MTOM attachment binary, base64, etc
 - 
CONNECTION_TIMEOUTstatic final String CONNECTION_TIMEOUT - See Also:
- Constant Field Values
 
 - 
RECEIVE_TIMEOUTstatic final String RECEIVE_TIMEOUT - See Also:
- Constant Field Values
 
 - 
THREAD_SAFE_STAX_FACTORIESstatic final String 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 Detail- 
getIdString getId() 
 - 
setIdvoid setId(String id) 
 - 
getInterceptorChainInterceptorChain 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
 
 - 
setInterceptorChainvoid setInterceptorChain(InterceptorChain chain) 
 - 
getDestinationDestination getDestination() - Returns:
- the associated Destination if message is inbound, null otherwise
 
 - 
getExchangeExchange getExchange() 
 - 
setExchangevoid setExchange(Exchange exchange) 
 - 
getAttachmentsCollection<Attachment> getAttachments() Retrieve any binary attachments associated with the message.- Returns:
- a collection containing the attachments
 
 - 
setAttachmentsvoid setAttachments(Collection<Attachment> attachments) 
 - 
getContent<T> T getContent(Class<T> format) 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<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)- Parameters:
- format- the provided content format
- content- the content to be encapsulated
 
 - 
getContentFormatsSet<Class<?>> getContentFormats() - Returns:
- the set of currently encapsulated content formats
 
 - 
removeContent<T> void removeContent(Class<T> format) Removes a content from a message. If some contents are completely consumed, removing them is a good idea- Parameters:
- format- the format to remove
 
 - 
getContextualPropertyObject getContextualProperty(String key) 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
 
 - 
resetContextCachevoid resetContextCache() Resets the cache of contextual properties that messages may contain. Subsequent calls to getContextualProperty will likely recalculate the cache.
 
- 
 
-