Interface Message

    • Field Detail

      • REQUESTOR_ROLE

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

        static final String INBOUND_MESSAGE
        Boolean property specifying if the message is inbound.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • ASYNC_POST_RESPONSE_DISPATCH

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

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

        static final String PARTIAL_ATTACHMENTS_MESSAGE
        Boolean property specifying if the attachments have been partially written (due to I/O error, fe).
        See Also:
        Constant Field Values
      • PROCESS_ONEWAY_RESPONSE

        static final String PROCESS_ONEWAY_RESPONSE
        Boolean property specifying if oneWay response must be processed.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • SCHEMA_VALIDATION_ENABLED

        static final String SCHEMA_VALIDATION_ENABLED
        Runtime schema validation property
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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:
        Constant Field Values
      • 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
      • 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
      • 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 Detail

      • 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
      • getDestination

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

        void setExchange​(Exchange exchange)
      • getAttachments

        Collection<Attachment> getAttachments()
        Retrieve any binary attachments associated with the message.
        Returns:
        a collection containing the 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