org.apache.james.queue.jms
Class MimeMessageObjectMessageSource

java.lang.Object
  extended by org.apache.james.core.MimeMessageSource
      extended by org.apache.james.queue.jms.MimeMessageObjectMessageSource
All Implemented Interfaces:
Disposable

public class MimeMessageObjectMessageSource
extends MimeMessageSource
implements Disposable

MimeMessageSource implementation which reads the data from the payload of an ObjectMessage. Its important that the payload is a byte array otherwise it will throw an ClassCastException


Constructor Summary
MimeMessageObjectMessageSource(javax.jms.ObjectMessage message)
           
 
Method Summary
 void dispose()
           
 InputStream getInputStream()
           
 long getMessageSize()
           
 String getSourceId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeMessageObjectMessageSource

public MimeMessageObjectMessageSource(javax.jms.ObjectMessage message)
                               throws javax.jms.JMSException
Throws:
javax.jms.JMSException
Method Detail

getMessageSize

public long getMessageSize()
                    throws IOException
Overrides:
getMessageSize in class MimeMessageSource
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in class MimeMessageSource
Throws:
IOException

getSourceId

public String getSourceId()
Specified by:
getSourceId in class MimeMessageSource

dispose

public void dispose()
Specified by:
dispose in interface Disposable


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.