org.jboss.soa.esb.actions.soap.attachment
Class MultipartRelatedDecoder

java.lang.Object
  extended by org.jboss.soa.esb.actions.soap.attachment.MultipartRelatedDecoder

public class MultipartRelatedDecoder
extends java.lang.Object

Abstract MutilPartRelatedDecoder decodes a mime multipart/related stream.

Since:
18-Jan-2006
Author:
Jason T. Greene, Thomas.Diesler@jboss.org

Constructor Summary
MultipartRelatedDecoder(javax.mail.internet.ContentType contentType)
          Constructs a MultipartRelatedDecoder.
 
Method Summary
 void decodeMultipartRelatedMessage(java.io.InputStream stream)
           
 java.util.Collection<javax.xml.soap.AttachmentPart> getRelatedParts()
          Returns a collection of AttachmentPart objects that represent the attachments on this message.
 javax.xml.soap.AttachmentPart getRootPart()
          Returns an AttachmentPart representing the root part of this multipart/related message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartRelatedDecoder

public MultipartRelatedDecoder(javax.mail.internet.ContentType contentType)
                        throws java.io.IOException,
                               javax.mail.MessagingException
Constructs a MultipartRelatedDecoder. This will block until the message has been decoded.

Parameters:
contentType - the mime Content-Type header provided by the transport
stream - The stream to pull the multipart message from
Throws:
java.io.IOException
javax.mail.MessagingException
Method Detail

decodeMultipartRelatedMessage

public void decodeMultipartRelatedMessage(java.io.InputStream stream)
                                   throws java.io.IOException,
                                          javax.mail.MessagingException
Throws:
java.io.IOException
javax.mail.MessagingException

getRootPart

public javax.xml.soap.AttachmentPart getRootPart()
Returns an AttachmentPart representing the root part of this multipart/related message.

Returns:
the root part of this multipart/related message

getRelatedParts

public java.util.Collection<javax.xml.soap.AttachmentPart> getRelatedParts()
Returns a collection of AttachmentPart objects that represent the attachments on this message. If there are no attachments, an empty collection is returned.