org.apache.james.protocols.smtp
Class MailEnvelopeImpl

java.lang.Object
  extended by org.apache.james.protocols.smtp.MailEnvelopeImpl
All Implemented Interfaces:
MailEnvelope

public class MailEnvelopeImpl
extends java.lang.Object
implements MailEnvelope

MailEnvelope implementation which stores everything in memory


Constructor Summary
MailEnvelopeImpl()
           
 
Method Summary
 java.io.InputStream getMessageInputStream()
          Return the InputStream of the message
 java.io.OutputStream getMessageOutputStream()
          Return the OutputStream of the message
 java.util.List<org.apache.mailet.MailAddress> getRecipients()
          Return the recipients which where supplied in the RCPT TO: command
 org.apache.mailet.MailAddress getSender()
          Return the sender of the mail which was supplied int the MAIL FROM: command.
 int getSize()
          Return the size of the message.
 void setRecipients(java.util.List<org.apache.mailet.MailAddress> recipientCollection)
          Set the recipients of the mail
 void setSender(org.apache.mailet.MailAddress sender)
          Set the sender of the mail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailEnvelopeImpl

public MailEnvelopeImpl()
Method Detail

getSize

public int getSize()
Description copied from interface: MailEnvelope
Return the size of the message. If the message is "empty" it will return -1

Specified by:
getSize in interface MailEnvelope
Returns:
size

getRecipients

public java.util.List<org.apache.mailet.MailAddress> getRecipients()
Description copied from interface: MailEnvelope
Return the recipients which where supplied in the RCPT TO: command

Specified by:
getRecipients in interface MailEnvelope
Returns:
recipients

getSender

public org.apache.mailet.MailAddress getSender()
Description copied from interface: MailEnvelope
Return the sender of the mail which was supplied int the MAIL FROM: command. If its a "null" sender, null will get returned

Specified by:
getSender in interface MailEnvelope
Returns:
sender

setRecipients

public void setRecipients(java.util.List<org.apache.mailet.MailAddress> recipientCollection)
Set the recipients of the mail

Parameters:
recipientCollection -

setSender

public void setSender(org.apache.mailet.MailAddress sender)
Set the sender of the mail

Parameters:
sender -

getMessageOutputStream

public java.io.OutputStream getMessageOutputStream()
Description copied from interface: MailEnvelope
Return the OutputStream of the message

Specified by:
getMessageOutputStream in interface MailEnvelope
Returns:
out

getMessageInputStream

public java.io.InputStream getMessageInputStream()
Description copied from interface: MailEnvelope
Return the InputStream of the message

Specified by:
getMessageInputStream in interface MailEnvelope
Returns:
in


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.