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 http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html
If your DB is not supported by this, use JPAMessage
TODO: Fix me!
|
Constructor Summary |
JPAStreamingMessage()
Deprecated. |
JPAStreamingMessage(JPAMailbox mailbox,
long uid,
Date internalDate,
int size,
javax.mail.Flags flags,
InputStream content,
int bodyStartOctet,
List<JPAHeader> headers,
PropertyBuilder propertyBuilder)
|
JPAStreamingMessage(JPAMailbox mailbox,
long uid,
Message<?> message)
Create a copy of the given message |
| Methods inherited from class org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage |
createUserFlags, equals, getBodyStartOctet, getFullContentOctets, getHeaders, getInternalDate, getMailbox, getMailboxId, getMediaType, getProperties, getSubType, getTextualLineCount, getUid, hashCode, isAnswered, isDeleted, isDraft, isFlagged, isRecent, isSeen, setFlags, setMailbox, setUid, toString |
JPAStreamingMessage
@Deprecated
public JPAStreamingMessage()
- Deprecated.
JPAStreamingMessage
public JPAStreamingMessage(JPAMailbox mailbox,
long uid,
Date internalDate,
int size,
javax.mail.Flags flags,
InputStream content,
int bodyStartOctet,
List<JPAHeader> headers,
PropertyBuilder propertyBuilder)
throws MailboxException
- Throws:
MailboxException
JPAStreamingMessage
public JPAStreamingMessage(JPAMailbox mailbox,
long uid,
Message<?> message)
throws MailboxException
- Create a copy of the given message
- Parameters:
message -
- Throws:
IOException
MailboxException
getFullContent
public InputStream getFullContent()
throws IOException
- Throws:
IOException
getBodyContent
public InputStream getBodyContent()
throws IOException
- Throws:
IOException
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.