org.ow2.petals.jbi.messaging.exchange
Class NormalizedMessageImpl

java.lang.Object
  extended by org.ow2.petals.jbi.messaging.exchange.NormalizedMessageImpl
All Implemented Interfaces:
java.io.Serializable, javax.jbi.messaging.NormalizedMessage
Direct Known Subclasses:
FaultImpl

public class NormalizedMessageImpl
extends java.lang.Object
implements javax.jbi.messaging.NormalizedMessage, java.io.Serializable

JBI NormalizedMessage implementation.

Since:
Petals 1.0
Author:
Adrien LOUIS - EBM WebSourcing
See Also:
Serialized Form

Field Summary
protected  java.util.Map<java.lang.String,javax.activation.DataHandler> attachments
          Attachments to the main message: id + content.
protected  javax.xml.transform.Source content
          The XML "payload" message.
protected  java.util.Map<java.lang.String,java.lang.Object> properties
          Metadata associated with the message content.
static java.lang.String PROPERTY_COMPRESSION
          The message exchange property name to set the compression of the exchange payload.
protected  javax.security.auth.Subject subject
          JAAS Security Subject.
 
Constructor Summary
NormalizedMessageImpl()
          This default constructor creates a new empty NormalizedMessage.
 
Method Summary
 void addAttachment(java.lang.String id, javax.activation.DataHandler attachment)
           
 javax.activation.DataHandler getAttachment(java.lang.String id)
           
 java.util.Set<?> getAttachmentNames()
           
 javax.xml.transform.Source getContent()
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.util.Set<?> getPropertyNames()
           
 javax.security.auth.Subject getSecuritySubject()
           
 void removeAttachment(java.lang.String id)
           
 void setContent(javax.xml.transform.Source content)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 void setSecuritySubject(javax.security.auth.Subject securitySubject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_COMPRESSION

public static final java.lang.String PROPERTY_COMPRESSION
The message exchange property name to set the compression of the exchange payload.

See Also:
Constant Field Values

attachments

protected transient java.util.Map<java.lang.String,javax.activation.DataHandler> attachments
Attachments to the main message: id + content.


content

protected transient javax.xml.transform.Source content
The XML "payload" message.


properties

protected java.util.Map<java.lang.String,java.lang.Object> properties
Metadata associated with the message content. Map: property + value.


subject

protected javax.security.auth.Subject subject
JAAS Security Subject.

Constructor Detail

NormalizedMessageImpl

public NormalizedMessageImpl()
This default constructor creates a new empty NormalizedMessage.

Method Detail

addAttachment

public void addAttachment(java.lang.String id,
                          javax.activation.DataHandler attachment)
                   throws javax.jbi.messaging.MessagingException
Specified by:
addAttachment in interface javax.jbi.messaging.NormalizedMessage
Throws:
javax.jbi.messaging.MessagingException

getAttachment

public javax.activation.DataHandler getAttachment(java.lang.String id)
Specified by:
getAttachment in interface javax.jbi.messaging.NormalizedMessage

getAttachmentNames

public java.util.Set<?> getAttachmentNames()
Specified by:
getAttachmentNames in interface javax.jbi.messaging.NormalizedMessage

getContent

public javax.xml.transform.Source getContent()
Specified by:
getContent in interface javax.jbi.messaging.NormalizedMessage

getProperty

public java.lang.Object getProperty(java.lang.String name)
Specified by:
getProperty in interface javax.jbi.messaging.NormalizedMessage

getPropertyNames

public java.util.Set<?> getPropertyNames()
Specified by:
getPropertyNames in interface javax.jbi.messaging.NormalizedMessage

getSecuritySubject

public javax.security.auth.Subject getSecuritySubject()
Specified by:
getSecuritySubject in interface javax.jbi.messaging.NormalizedMessage

removeAttachment

public void removeAttachment(java.lang.String id)
                      throws javax.jbi.messaging.MessagingException
Specified by:
removeAttachment in interface javax.jbi.messaging.NormalizedMessage
Throws:
javax.jbi.messaging.MessagingException

setContent

public void setContent(javax.xml.transform.Source content)
                throws javax.jbi.messaging.MessagingException
Specified by:
setContent in interface javax.jbi.messaging.NormalizedMessage
Throws:
javax.jbi.messaging.MessagingException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Specified by:
setProperty in interface javax.jbi.messaging.NormalizedMessage

setSecuritySubject

public void setSecuritySubject(javax.security.auth.Subject securitySubject)
Specified by:
setSecuritySubject in interface javax.jbi.messaging.NormalizedMessage


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