org.apache.cxf.message
Class AbstractWrappedMessage
java.lang.Object
org.apache.cxf.message.AbstractWrappedMessage
- All Implemented Interfaces:
- java.util.Map<java.lang.String,java.lang.Object>, Message
- Direct Known Subclasses:
- XMLMessage
public abstract class AbstractWrappedMessage
- extends java.lang.Object
- implements Message
A base class to build your own message implementations on.
- Author:
- Dan
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Fields inherited from interface org.apache.cxf.message.Message |
ASYNC_POST_RESPONSE_DISPATCH, BASE_PATH, CONTENT_TYPE, DECOUPLED_CHANNEL_MESSAGE, ENCODING, ENDPOINT_ADDRESS, FAULT_STACKTRACE_ENABLED, FIXED_PARAMETER_ORDER, HTTP_REQUEST_METHOD, INBOUND_MESSAGE, INVOCATION_OBJECTS, MIME_HEADERS, MTOM_ENABLED, PARTIAL_RESPONSE_MESSAGE, PATH_INFO, PROTOCOL_HEADERS, QUERY_STRING, REQUESTOR_ROLE, RESPONSE_CODE, SCHEMA_VALIDATION_ENABLED, TRANSPORT, WSDL_DESCRIPTION, WSDL_INTERFACE, WSDL_OPERATION, WSDL_PORT, WSDL_SERVICE |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
AbstractWrappedMessage
protected AbstractWrappedMessage(Message msg)
clear
public void clear()
- Specified by:
clear
in interface java.util.Map<java.lang.String,java.lang.Object>
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface java.util.Map<java.lang.String,java.lang.Object>
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interface java.util.Map<java.lang.String,java.lang.Object>
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
- Specified by:
entrySet
in interface java.util.Map<java.lang.String,java.lang.Object>
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface java.util.Map<java.lang.String,java.lang.Object>
- Overrides:
equals
in class java.lang.Object
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map<java.lang.String,java.lang.Object>
getAttachments
public java.util.Collection<Attachment> getAttachments()
- Specified by:
getAttachments
in interface Message
setAttachments
public void setAttachments(java.util.Collection<Attachment> attachments)
- Specified by:
setAttachments
in interface Message
getMessage
public Message getMessage()
setMessage
public void setMessage(Message message)
getConduit
public Conduit getConduit()
- Specified by:
getConduit
in interface Message
- Returns:
- the associated Conduit if message is outbound, null otherwise
getDestination
public Destination getDestination()
- Specified by:
getDestination
in interface Message
- Returns:
- the associated Destination if message is inbound, null otherwise
getExchange
public Exchange getExchange()
- Specified by:
getExchange
in interface Message
setExchange
public void setExchange(Exchange exchange)
- Specified by:
setExchange
in interface Message
getId
public java.lang.String getId()
- Specified by:
getId
in interface Message
setId
public void setId(java.lang.String id)
- Specified by:
setId
in interface Message
getInterceptorChain
public InterceptorChain getInterceptorChain()
- Specified by:
getInterceptorChain
in interface Message
setInterceptorChain
public void setInterceptorChain(InterceptorChain chain)
- Specified by:
setInterceptorChain
in interface Message
getContent
public <T> T getContent(java.lang.Class<T> format)
- Description copied from interface:
Message
- Retrieve the encapsulated content as a particular type (a result type
if message is outbound, a source type if message is inbound)
- Specified by:
getContent
in interface Message
- Parameters:
format
- the expected content format
- Returns:
- the encapsulated content
getContentFormats
public java.util.Set<java.lang.Class<?>> getContentFormats()
- Specified by:
getContentFormats
in interface Message
- Returns:
- the set of currently encapsulated content formats
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.util.Map<java.lang.String,java.lang.Object>
- Overrides:
hashCode
in class java.lang.Object
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Map<java.lang.String,java.lang.Object>
keySet
public java.util.Set<java.lang.String> keySet()
- Specified by:
keySet
in interface java.util.Map<java.lang.String,java.lang.Object>
put
public java.lang.Object put(java.lang.String key,
java.lang.Object value)
- Specified by:
put
in interface java.util.Map<java.lang.String,java.lang.Object>
putAll
public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> t)
- Specified by:
putAll
in interface java.util.Map<java.lang.String,java.lang.Object>
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map<java.lang.String,java.lang.Object>
setContent
public <T> void setContent(java.lang.Class<T> format,
java.lang.Object content)
- 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 interface Message
- Parameters:
format
- the provided content formatcontent
- the content to be encapsulated
size
public int size()
- Specified by:
size
in interface java.util.Map<java.lang.String,java.lang.Object>
values
public java.util.Collection<java.lang.Object> values()
- Specified by:
values
in interface java.util.Map<java.lang.String,java.lang.Object>
get
public <T> T get(java.lang.Class<T> key)
- Description copied from interface:
Message
- Convenience method for storing/retrieving typed objects from the map.
equivalent to: (T)get(key.getName());
- Specified by:
get
in interface Message
- Parameters:
key
- the key
- Returns:
- the value
put
public <T> void put(java.lang.Class<T> key,
T value)
- Description copied from interface:
Message
- Convenience method for storing/retrieving typed objects from the map.
equivalent to: put(key.getName(), value);
- Specified by:
put
in interface Message
- Parameters:
key
- the keyvalue
- the value
getContextualProperty
public java.lang.Object getContextualProperty(java.lang.String key)
- Specified by:
getContextualProperty
in interface Message
Apache CXF is an effort undergoing incubation at the Apache Software Foundation(ASF) and sponsored by the Apache Incubator PMC.