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.JMSExceptionpublic long getMessageSize()
throws IOException
MimeMessageSourcegetMessageSize in class MimeMessageSourceIOException - if an error is encountered while computing the message sizepublic InputStream getInputStream() throws IOException
MimeMessageSourcegetInputStream in class MimeMessageSourceInputStream containing the dataIOException - if an error occurs while generating the InputStreamMimeMessageSource.getInputStream()public String getSourceId()
MimeMessageSourcegetSourceId in class MimeMessageSourceMimeMessageSource.getSourceId()public void dispose()
Disposabledispose in interface DisposableDisposable.dispose()Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.