Interface Message

All Superinterfaces:
Map<String,Object>, StringMap
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 Details

    • TRANSPORT

      static final String TRANSPORT
      See Also:
    • REST_MESSAGE

      static final String REST_MESSAGE
      See Also:
    • REQUESTOR_ROLE

      static final String REQUESTOR_ROLE
      Boolean property specifying if the message is a request message.
      See Also:
    • INBOUND_MESSAGE

      static final String INBOUND_MESSAGE
      Boolean property specifying if the message is inbound.
      See Also:
    • INVOCATION_CONTEXT

      static 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:
    • SERVICE_OBJECT

      static final String SERVICE_OBJECT
      Current Service Object
      See Also:
    • MIME_HEADERS

      static final String MIME_HEADERS
      A Map containing the MIME headers for a SOAP message.
      See Also:
    • ASYNC_POST_RESPONSE_DISPATCH

      static final String ASYNC_POST_RESPONSE_DISPATCH
      Boolean property specifying if the server should send the response asynchronously.
      See Also:
    • DECOUPLED_CHANNEL_MESSAGE

      static final String DECOUPLED_CHANNEL_MESSAGE
      Boolean property specifying if this message arrived via a decoupled endpoint.
      See Also:
    • PARTIAL_RESPONSE_MESSAGE

      static final String PARTIAL_RESPONSE_MESSAGE
      See Also:
    • EMPTY_PARTIAL_RESPONSE_MESSAGE

      static final String EMPTY_PARTIAL_RESPONSE_MESSAGE
      See Also:
    • ONE_WAY_REQUEST

      static final String ONE_WAY_REQUEST
      See Also:
    • PROCESS_ONEWAY_RESPONSE

      static final String PROCESS_ONEWAY_RESPONSE
      Boolean property specifying if oneWay response must be processed.
      See Also:
    • PROCESS_202_RESPONSE_ONEWAY_OR_PARTIAL

      static final String 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

      static 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:
    • THREAD_CONTEXT_SWITCHED

      static 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:
    • ROBUST_ONEWAY

      static final String ROBUST_ONEWAY
      See Also:
    • HTTP_REQUEST_METHOD

      static final String HTTP_REQUEST_METHOD
      See Also:
    • REQUEST_URI

      static final String REQUEST_URI
      See Also:
    • REQUEST_URL

      static final String REQUEST_URL
      See Also:
    • PROTOCOL_HEADERS

      static final String PROTOCOL_HEADERS
    • RESPONSE_CODE

      static final String RESPONSE_CODE
    • ERROR_MESSAGE

      static final String ERROR_MESSAGE
    • ENDPOINT_ADDRESS

      static final String ENDPOINT_ADDRESS
    • PATH_INFO

      static final String PATH_INFO
    • QUERY_STRING

      static final String QUERY_STRING
    • PROPOGATE_EXCEPTION

      static final String PROPOGATE_EXCEPTION
    • MTOM_ENABLED

      static final String MTOM_ENABLED
      Boolean property specifying in the runtime is configured to process MTOM attachments.
      See Also:
    • MTOM_THRESHOLD

      static final String MTOM_THRESHOLD
      See Also:
    • SCHEMA_VALIDATION_ENABLED

      static final String SCHEMA_VALIDATION_ENABLED
      Runtime schema validation property
      See Also:
    • SCHEMA_VALIDATION_TYPE

      static final String SCHEMA_VALIDATION_TYPE
      The default values for schema validation will be set in the service model using this property
      See Also:
    • FAULT_STACKTRACE_ENABLED

      static final String FAULT_STACKTRACE_ENABLED
      Boolean property specifying if the Java stack trace is returned as a SOAP fault message.
      See Also:
    • EXCEPTION_MESSAGE_CAUSE_ENABLED

      static 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:
    • EXCEPTION_CAUSE_SUFFIX

      static 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:
    • CONTENT_TYPE

      static final String CONTENT_TYPE
      See Also:
    • ACCEPT_CONTENT_TYPE

      static final String ACCEPT_CONTENT_TYPE
      See Also:
    • BASE_PATH

      static final String BASE_PATH
    • ENCODING

      static final String ENCODING
    • FIXED_PARAMETER_ORDER

      static final String FIXED_PARAMETER_ORDER
    • MAINTAIN_SESSION

      static final String MAINTAIN_SESSION
    • ATTACHMENTS

      static final String ATTACHMENTS
    • WSDL_DESCRIPTION

      static final String WSDL_DESCRIPTION
      See Also:
    • WSDL_SERVICE

      static final String WSDL_SERVICE
      See Also:
    • WSDL_PORT

      static final String WSDL_PORT
      See Also:
    • WSDL_INTERFACE

      static final String WSDL_INTERFACE
      See Also:
    • WSDL_OPERATION

      static final String WSDL_OPERATION
      See Also:
    • IN_INTERCEPTORS

      static final String IN_INTERCEPTORS
      Some properties to allow adding interceptors to the chain on a per-request basis. All are a Collection These are NOT contextual properties (ie: not searched outside the message). They must exist on the message itself at time of Chain creation
    • OUT_INTERCEPTORS

      static final String OUT_INTERCEPTORS
    • FAULT_IN_INTERCEPTORS

      static final String FAULT_IN_INTERCEPTORS
    • FAULT_OUT_INTERCEPTORS

      static final String FAULT_OUT_INTERCEPTORS
    • INTERCEPTOR_PROVIDERS

      static final String INTERCEPTOR_PROVIDERS
      As above, but Collection
    • CONTENT_TRANSFER_ENCODING

      static final String CONTENT_TRANSFER_ENCODING
      Content-Transfer-Encoding used for MTOM attachment binary, base64, etc
    • CONNECTION_TIMEOUT

      static final String CONNECTION_TIMEOUT
      See Also:
    • RECEIVE_TIMEOUT

      static final String RECEIVE_TIMEOUT
      See Also:
    • THREAD_SAFE_STAX_FACTORIES

      static 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 to true, CXF doesn't synchronize accesses to the factories.
  • Method Details

    • getId

      String getId()
    • setId

      void setId(String id)
    • 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

      void setInterceptorChain(InterceptorChain chain)
    • getDestination

      Destination getDestination()
      Returns:
      the associated Destination if message is inbound, null otherwise
    • getExchange

      Exchange getExchange()
    • setExchange

      void setExchange(Exchange exchange)
    • getAttachments

      Collection<Attachment> getAttachments()
      Retrieve any binary attachments associated with the message.
      Returns:
      a collection containing the attachments
    • setAttachments

      void 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
    • getContentFormats

      Set<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
    • getContextualProperty

      Object 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
    • resetContextCache

      void resetContextCache()
      Resets the cache of contextual properties that messages may contain. Subsequent calls to getContextualProperty will likely recalculate the cache.
    • getContextualPropertyKeys

      Set<String> getContextualPropertyKeys()
      Returns:
      set of defined contextual property keys