org.apache.james.mailrepository
Class MimeMessageJDBCSource
java.lang.Object
|
+--org.apache.james.core.MimeMessageSource
|
+--org.apache.james.mailrepository.MimeMessageJDBCSource
- public class MimeMessageJDBCSource
- extends MimeMessageSource
This class points to a specific message in a repository. This will return an
InputStream to the JDBC field/record, possibly sequenced with the file stream.
Constructor Summary |
MimeMessageJDBCSource(JDBCMailRepository repository,
java.lang.String key,
org.apache.avalon.cornerstone.services.store.StreamRepository sr)
Construct a MimeMessageSource based on a JDBC repository, a key, and a
stream repository (where we might store the message body) |
Method Summary |
boolean |
equals(java.lang.Object obj)
Check to see whether this is the same repository and the same key |
java.io.InputStream |
getInputStream()
Return the input stream to the database field and then the file stream. |
long |
getSize()
Runs a custom SQL statement to check the size of the message body |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MimeMessageJDBCSource
public MimeMessageJDBCSource(JDBCMailRepository repository,
java.lang.String key,
org.apache.avalon.cornerstone.services.store.StreamRepository sr)
throws java.io.IOException
- Construct a MimeMessageSource based on a JDBC repository, a key, and a
stream repository (where we might store the message body)
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Return the input stream to the database field and then the file stream. This should
be smart enough to work even if the file does not exist. This is to support
a repository with the entire message in the database, which is how James 1.2 worked.
- Overrides:
getInputStream
in class MimeMessageSource
getSize
public long getSize()
throws java.io.IOException
- Runs a custom SQL statement to check the size of the message body
- Overrides:
getSize
in class MimeMessageSource
equals
public boolean equals(java.lang.Object obj)
- Check to see whether this is the same repository and the same key
- Overrides:
equals
in class java.lang.Object
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.