public class MimeMessageJDBCSource extends MimeMessageSource
| Constructor and Description |
|---|
MimeMessageJDBCSource(JDBCMailRepository repository,
String key,
StreamRepository sr)
Construct a MimeMessageSource based on a JDBC repository, a key, and a
stream repository (where we might store the message body)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Check to see whether this is the same repository and the same key
|
InputStream |
getInputStream()
Return the input stream to the database field and then the file stream.
|
long |
getMessageSize()
Runs a custom SQL statement to check the size of the message body
|
String |
getSourceId()
Returns a unique String ID that represents the location from where this
source is loaded.
|
int |
hashCode()
Provide a hash code that is consistent with equals for this class
|
public MimeMessageJDBCSource(JDBCMailRepository repository, String key, StreamRepository sr) throws IOException
repository - the JDBCMailRepository to usekey - the key for the particular stream in the stream repository to
be used by this data source.sr - the stream repository used by this data source.IOException - get thrown if an IO error detectedpublic String getSourceId()
getSourceId in class MimeMessageSourcepublic InputStream getInputStream() throws IOException
getInputStream in class MimeMessageSourceInputStream containing the dataIOException - if an error occurs while generating the InputStreamMimeMessageSource.getInputStream()public long getMessageSize()
throws IOException
getMessageSize in class MimeMessageSourceIOException - if an error is encountered while computing the message sizeMimeMessageSource.getMessageSize()public boolean equals(Object obj)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.