org.apache.servicemix.soap.api
Interface Message

All Superinterfaces:
Map<String,Object>
All Known Implementing Classes:
MessageImpl

public interface Message
extends Map<String,Object>


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static String CONTENT_TYPE
           
 
Method Summary
<T> T
get(Class<T> key)
          Convenience method for storing/retrieving typed objects from the map.
 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)
 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 interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

CONTENT_TYPE

static final String CONTENT_TYPE
See Also:
Constant Field Values
Method Detail

getAttachments

Map<String,DataHandler> getAttachments()
Acces to attachments

Returns:

getContent

<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)

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

get

<T> T get(Class<T> key)
Convenience method for storing/retrieving typed objects from the map. equivilent to: (T)get(key.getName());

Type Parameters:
T - key
Returns:

put

<T> void put(Class<T> key,
             T value)
Convenience method for storing/retrieving typed objects from the map. equivilent to: put(key.getName(), value);

Type Parameters:
T - key

getTransportHeaders

Map<String,String> getTransportHeaders()
Access to the transport level headers

Returns:

getSoapHeaders

Map<QName,DocumentFragment> getSoapHeaders()
Access to soap headers

Returns:


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