javax.jbi.messaging
Interface NormalizedMessage

All Known Subinterfaces:
Fault

public interface NormalizedMessage

Represents a JBI Normalized Message. A normalized message consists of:

Author:
JSR208 Expert Group

Method Summary
 void addAttachment(java.lang.String id, javax.activation.DataHandler content)
          Add an attachment to this message.
 javax.activation.DataHandler getAttachment(java.lang.String id)
          Retrieve an attachment to this message with the specified identifier.
 java.util.Set getAttachmentNames()
          Returns a list of identifiers for all attachments to this message.
 javax.xml.transform.Source getContent()
          Retrieve the content of this message.
 java.lang.Object getProperty(java.lang.String name)
          Retrieve a property from the message.
 java.util.Set getPropertyNames()
          Retrieve a set of property names for this message.
 javax.security.auth.Subject getSecuritySubject()
          Get the security subject associated with this message.
 void removeAttachment(java.lang.String id)
          Removes the attachment from this message with the specified unique identifier.
 void setContent(javax.xml.transform.Source content)
          Set the content of this message.
 void setProperty(java.lang.String name, java.lang.Object value)
          Set a property on the message.
 void setSecuritySubject(javax.security.auth.Subject subject)
          Set the security subject associated with this message.
 

Method Detail

addAttachment

void addAttachment(java.lang.String id,
                   javax.activation.DataHandler content)
                   throws MessagingException
Add an attachment to this message.

Parameters:
id - unique identifier for the attachment; must be non-null and non-empty
content - attachment content; must be non-null
Throws:
MessagingException - failed to add attachment

getAttachment

javax.activation.DataHandler getAttachment(java.lang.String id)
Retrieve an attachment to this message with the specified identifier.

Parameters:
id - unique identifier for attachment; must be non-null and non-empty
Returns:
DataHandler representing attachment content, or null if an attachment with the specified identifier is not found

getAttachmentNames

java.util.Set getAttachmentNames()
Returns a list of identifiers for all attachments to this message.

Returns:
a Set of attachment identifier Strings; must be non-null; may be empty

getContent

javax.xml.transform.Source getContent()
Retrieve the content of this message.

Returns:
message content; may be null

getProperty

java.lang.Object getProperty(java.lang.String name)
Retrieve a property from the message.

Parameters:
name - property name; must be non-null and non-empty
Returns:
property value, or null if the property does not exist or has no value

getPropertyNames

java.util.Set getPropertyNames()
Retrieve a set of property names for this message.

Returns:
set of property names for this message; must be non-null; may be empty

getSecuritySubject

javax.security.auth.Subject getSecuritySubject()
Get the security subject associated with this message.

Returns:
the security subject associated with this message; null if none.

removeAttachment

void removeAttachment(java.lang.String id)
                      throws MessagingException
Removes the attachment from this message with the specified unique identifier.

Parameters:
id - attachment identifier; must be non-null and non-empty
Throws:
MessagingException - failed to remove attachment or the attachment does not exist

setContent

void setContent(javax.xml.transform.Source content)
                throws MessagingException
Set the content of this message.

Parameters:
content - message content; may be null
Throws:
MessagingException - failed to set content

setProperty

void setProperty(java.lang.String name,
                 java.lang.Object value)
Set a property on the message.

Parameters:
name - property name; must be non-null and non-empty
value - property value; may be null

setSecuritySubject

void setSecuritySubject(javax.security.auth.Subject subject)
Set the security subject associated with this message.

Parameters:
subject - the security subject to associate with this message; may be null


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.