org.apache.servicemix.soap.core
Class MessageImpl

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

public class MessageImpl
extends HashMap<String,Object>
implements Message

Author:
Guillaume Nodet
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface org.apache.servicemix.soap.api.Message
CONTENT_TYPE
 
Constructor Summary
MessageImpl()
           
 
Method Summary
<T> T
get(Class<T> key)
          Convenience method for storing/retrieving typed objects from the map.
 String getAttachmentMimeType()
           
 Map<String,DataHandler> getAttachments()
          Acces to attachments
<T> T
getContent(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)
 Set<Class<?>> getContentFormats()
           
 Map<QName,DocumentFragment> getSoapHeaders()
          Access to soap headers
 Map<String,String> getTransportHeaders()
          Access to the transport level headers
<T> void
put(Class<T> key, T value)
          Convenience method for storing/retrieving typed objects from the map.
<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)
 
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 Map<String,DataHandler> getAttachments()
Description copied from interface: Message
Acces to attachments

Specified by:
getAttachments in interface Message
Returns:

getAttachmentMimeType

public String getAttachmentMimeType()

getContent

public <T> T getContent(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(Class<T> format,
                           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 Set<Class<?>> getContentFormats()

get

public <T> T get(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(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 Map<QName,DocumentFragment> getSoapHeaders()
Description copied from interface: Message
Access to soap headers

Specified by:
getSoapHeaders in interface Message
Returns:

getTransportHeaders

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

Specified by:
getTransportHeaders in interface Message
Returns:


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.