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

public 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

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

Returns:
message content

getAttachment

public 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

public java.util.Set getAttachmentNames()
Returns a list of identifiers for each attachment to the message.

Returns:
iterator over String attachment identifiers

removeAttachment

public 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

public 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

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

Parameters:
name - property name
value - property value

setSecuritySubject

public void setSecuritySubject(javax.security.auth.Subject subject)
Set the security Subject for the message.

Parameters:
subject - Subject to associated with message.

getPropertyNames

public java.util.Set getPropertyNames()
Retrieve a list of property names for the message.

Returns:
list of property names

getProperty

public 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

public javax.security.auth.Subject getSecuritySubject()
Retrieve the security Subject from the message.

Returns:
security Subject associated with message, or null.

Built 06/07/2005 11:16 AM on acer (SunOS 5.9)

Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.