org.apache.james.mailbox.jpa.mail.model.openjpa
Class JPAStreamingMessage
java.lang.Object
org.apache.james.mailbox.store.mail.model.AbstractMessage<Long>
org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage
org.apache.james.mailbox.jpa.mail.model.openjpa.JPAStreamingMessage
- All Implemented Interfaces:
- Comparable<Message<Long>>, Message<Long>
@Entity(name="Message")
public class JPAStreamingMessage
- extends AbstractJPAMessage
JPA implementation of AbstractJPAMessage which use openjpas Persistent type to
be able to stream the message content without loading it into the memory at all.
This is not supported for all DB's yet. See Additional JPA Mappings
If your DB is not supported by this, use JPAMessage
TODO: Fix me!
| Methods inherited from class org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage |
createUserFlags, equals, getBodyStartOctet, getFullContentOctets, getInternalDate, getMailbox, getMailboxId, getMediaType, getModSeq, getProperties, getSubType, getTextualLineCount, getUid, hashCode, isAnswered, isDeleted, isDraft, isFlagged, isRecent, isSeen, setFlags, setMailbox, setModSeq, setUid, toString |
JPAStreamingMessage
@Deprecated
public JPAStreamingMessage()
- Deprecated.
JPAStreamingMessage
public JPAStreamingMessage(JPAMailbox mailbox,
Date internalDate,
int size,
javax.mail.Flags flags,
javax.mail.internet.SharedInputStream content,
int bodyStartOctet,
PropertyBuilder propertyBuilder)
throws MailboxException
- Throws:
MailboxException
JPAStreamingMessage
public JPAStreamingMessage(JPAMailbox mailbox,
long uid,
long modSeq,
Message<?> message)
throws MailboxException
- Create a copy of the given message
- Parameters:
message -
- Throws:
IOException
MailboxException
getBodyContent
public InputStream getBodyContent()
throws IOException
- Throws:
IOException- See Also:
Message.getBodyContent()
getHeaderContent
public InputStream getHeaderContent()
throws IOException
- Throws:
IOException- See Also:
Message.getHeaderContent()
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.