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 and Description |
---|
MimeMessageObjectMessageSource(javax.jms.ObjectMessage message) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose the object
|
InputStream |
getInputStream()
Get an input stream to retrieve the data stored in the datasource
|
long |
getMessageSize()
Return the size of all the data.
|
String |
getSourceId()
Returns a unique String ID that represents the location from where this
file is loaded.
|
public MimeMessageObjectMessageSource(javax.jms.ObjectMessage message) throws javax.jms.JMSException
javax.jms.JMSException
public long getMessageSize() throws IOException
MimeMessageSource
getMessageSize
in class MimeMessageSource
IOException
- if an error is encountered while computing the message sizepublic InputStream getInputStream() throws IOException
MimeMessageSource
getInputStream
in class MimeMessageSource
InputStream
containing the dataIOException
- if an error occurs while generating the InputStreamMimeMessageSource.getInputStream()
public String getSourceId()
MimeMessageSource
getSourceId
in class MimeMessageSource
MimeMessageSource.getSourceId()
public void dispose()
Disposable
dispose
in interface Disposable
Disposable.dispose()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.