org.apache.servicemix.soap.core
Class MessageImpl

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.Object>
          extended by org.apache.servicemix.soap.core.MessageImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>, Message

public class MessageImpl
extends java.util.HashMap<java.lang.String,java.lang.Object>
implements Message

Author:
Guillaume Nodet
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface org.apache.servicemix.soap.api.Message
CONTENT_TYPE, REQUEST_MESSAGE
 
Constructor Summary
MessageImpl()
           
 
Method Summary
<T> T
get(java.lang.Class<T> key)
          Convenience method for storing/retrieving typed objects from the map.
 java.lang.String getAttachmentMimeType()
           
 java.util.Map<java.lang.String,javax.activation.DataHandler> getAttachments()
          Acces to attachments
<T> T
getContent(java.lang.Class<T> format)
          Retreive the encapsulated content as a particular type (a result type if message is outbound, a source type if message is inbound)
 java.util.Set<java.lang.Class<?>> getContentFormats()
           
 java.util.Map<javax.xml.namespace.QName,org.w3c.dom.DocumentFragment> getSoapHeaders()
          Access to soap headers
 java.util.Map<java.lang.String,java.lang.String> getTransportHeaders()
          Access to the transport level headers
<T> void
put(java.lang.Class<T> key, T value)
          Convenience method for storing/retrieving typed objects from the map.
<T> void
setContent(java.lang.Class<T> format, java.lang.Object content)
          Provide the encapsulated content as a particular type (a result type if message is outbound, a source type if message is inbound)
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, 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, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

MessageImpl

public MessageImpl()
Method Detail

getAttachments

public java.util.Map<java.lang.String,javax.activation.DataHandler> getAttachments()
Description copied from interface: Message
Acces to attachments

Specified by:
getAttachments in interface Message
Returns:

getAttachmentMimeType

public java.lang.String getAttachmentMimeType()

getContent

public <T> T getContent(java.lang.Class<T> format)
Description copied from interface: Message
Retreive 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

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 format
content - the content to be encapsulated

getContentFormats

public java.util.Set<java.lang.Class<?>> getContentFormats()

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. equivilent to: (T)get(key.getName());

Specified by:
get in interface Message
Type Parameters:
T - key
Returns:

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. equivilent to: put(key.getName(), value);

Specified by:
put in interface Message
Type Parameters:
T - key

getSoapHeaders

public java.util.Map<javax.xml.namespace.QName,org.w3c.dom.DocumentFragment> getSoapHeaders()
Description copied from interface: Message
Access to soap headers

Specified by:
getSoapHeaders in interface Message
Returns:

getTransportHeaders

public java.util.Map<java.lang.String,java.lang.String> getTransportHeaders()
Description copied from interface: Message
Access to the transport level headers

Specified by:
getTransportHeaders in interface Message
Returns:


Copyright © 2005-2015 FuseSource. All Rights Reserved.