Skip navigation links

Oracle Fusion Middleware Infrastructure Management Java API Reference for Oracle SOA Suite
11g Release 1 (11.1.1)
E10659-01


oracle.soa.api.message
Interface Message<T>

All Superinterfaces:
java.io.Serializable

public interface Message<T>
extends java.io.Serializable

Abstract message representation, the default implementation is an XML based message, that can be created via XMLMessageFactory.getInstance().createMessage

  // create a std dom parser
  DOMParser parser = new DOMParser();
  parser.parse(new InputSource(new StringReader(xml)));

  Element element = parser.getDocument().getDocumentElement();
  Map <String, Element> payload = new HashMap<String, Element>();
  payload.put(<payload part name>, element);
  Message<Element> xmlMessage = 
       XMLMessageFactory.getInstance().createMessage(payload);
 

If the conversation id is set as property, the composite instance will get it injected and can be found back with the Locator, based on this id.


Field Summary
static java.lang.String CONVERSATION_ID
           
static java.lang.String FLOW_ID
           
static java.lang.String PARENT_ID
           

 

Method Summary
 void addAttachment(Attachment attachment)
          Adds a message attachment
 void addHeader(org.w3c.dom.Element header)
          Adds a protocol header to the message
 java.util.List<Attachment> getAttachments()
          Gets the message attachments
 java.util.List<org.w3c.dom.Element> getHeaders()
          Gets the protocol headers
 Payload<T> getPayload()
          Gets the message payload
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Gets the message properties
 java.lang.Object getProperty(java.lang.String name)
          Gets the specified message property value
 void setHeaders(java.util.List<org.w3c.dom.Element> headers)
          Replaces the current set of protocol headers with the specified set
 void setPayload(Payload<T> payload)
          Specifies the payload associated with the message
 void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
          Replaces all existing properties on the message with the specified set
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets a specific property on the message

 

Field Detail

FLOW_ID

static final java.lang.String FLOW_ID
See Also:
Constant Field Values

CONVERSATION_ID

static final java.lang.String CONVERSATION_ID
See Also:
Constant Field Values

PARENT_ID

static final java.lang.String PARENT_ID
See Also:
Constant Field Values

Method Detail

setPayload

void setPayload(Payload<T> payload)
Specifies the payload associated with the message
Parameters:
payload - the payload of the message.

getPayload

Payload<T> getPayload()
Gets the message payload
Returns:
The message payload

addAttachment

void addAttachment(Attachment attachment)
Adds a message attachment
Parameters:
attachment - an attachment

getAttachments

java.util.List<Attachment> getAttachments()
Gets the message attachments
Returns:
The message attachments

addHeader

void addHeader(org.w3c.dom.Element header)
Adds a protocol header to the message
Parameters:
header - the header

setHeaders

void setHeaders(java.util.List<org.w3c.dom.Element> headers)
Replaces the current set of protocol headers with the specified set
Parameters:
headers - the replacement headers

getHeaders

java.util.List<org.w3c.dom.Element> getHeaders()
Gets the protocol headers
Returns:
The protocol headers

setProperties

void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Replaces all existing properties on the message with the specified set
Parameters:
properties - the replacement properties

getProperties

java.util.Map<java.lang.String,java.lang.Object> getProperties()
Gets the message properties
Returns:
The message properties

setProperty

void setProperty(java.lang.String name,
                 java.lang.Object value)
Sets a specific property on the message
Parameters:
name - the name of the property
value - the value of the named property

getProperty

java.lang.Object getProperty(java.lang.String name)
Gets the specified message property value
Parameters:
name - the property name
Returns:
The value of the specified property

Skip navigation links

Oracle Fusion Middleware Infrastructure Management Java API Reference for Oracle SOA Suite
11g Release 1 (11.1.1)
E10659-01


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.