## javax.jbi.messaging
Interface NormalizedMessage

All Known Subinterfaces:
  Fault

    public interface NormalizedMessage

Represents a JBI Normalized Message.

Author:
  JSR208 Expert Group

Method Summary
`void` `addAttachment(java.lang.String id, javax.activation.DataHandler content)` Add an attachment to the message.
`javax.activation.DataHandler` `getAttachment(java.lang.String id)` Retrieve attachment with the specified identifier.
`java.util.Set` `getAttachmentNames()` Returns a list of identifiers for each attachment to the message.
`javax.xml.transform.Source` `getContent()` Retrieve the content of the message.
`java.lang.Object` `getProperty(java.lang.String name)` Retrieve a property from the message.
`java.util.Set` `getPropertyNames()` Retrieve a list of property names for the message.
`javax.security.auth.Subject` `getSecuritySubject()` Retrieve the security Subject from the message.
`void` `removeAttachment(java.lang.String id)` Removes attachment with the specified unique identifier.
`void` `setContent(javax.xml.transform.Source content)` Set the content of the 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 for the message.

Method Detail

### addAttachment

    void addAttachment(java.lang.String id,
                       javax.activation.DataHandler content)
                       throws MessagingException

  Add an attachment to the message.

  Parameters:
    `id` - unique identifier for the attachment
    `content` - attachment content
  Throws:
    `MessagingException` - failed to add attachment

### getContent

    javax.xml.transform.Source getContent()

  Retrieve the content of the message.

  Returns:
    message content

### getAttachment

    javax.activation.DataHandler getAttachment(java.lang.String id)

  Retrieve attachment with the specified identifier.

  Parameters:
    `id` - unique identifier for attachment
  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 each attachment to the message.

  Returns:
    iterator over String attachment identifiers

### removeAttachment

    void removeAttachment(java.lang.String id)
                          throws MessagingException

  Removes attachment with the specified unique identifier.

  Parameters:
    `id` - attachment identifier
  Throws:
    `MessagingException` - failed to remove attachment

### setContent

    void setContent(javax.xml.transform.Source content)
                    throws MessagingException

  Set the content of the message.

  Parameters:
    `content` - message content
  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
    `value` - property value

### setSecuritySubject

    void setSecuritySubject(javax.security.auth.Subject subject)

  Set the security Subject for the message.

  Parameters:
    `subject` - Subject to associated with message.

### getPropertyNames

    java.util.Set getPropertyNames()

  Retrieve a list of property names for the message.

  Returns:
    list of property names

### getProperty

    java.lang.Object getProperty(java.lang.String name)

  Retrieve a property from the message.

  Parameters:
    `name` - property name
  Returns:
    property value, or null if the property does not exist

### getSecuritySubject

    javax.security.auth.Subject getSecuritySubject()

  Retrieve the security Subject from the message.

  Returns:
    security Subject associated with message, or null.

${build-info}

${copyright}