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 Object
implements MailEnvelope

MailEnvelope implementation which stores everything in memory


Constructor Summary
MailEnvelopeImpl()
           
 
Method Summary
 InputStream getMessageInputStream()
          Return the InputStream of the message
 OutputStream getMessageOutputStream()
          Return the OutputStream of the message
 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(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
See Also:
MailEnvelope.getSize()

getRecipients

public 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
See Also:
MailEnvelope.getRecipients()

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
See Also:
MailEnvelope.getSender()

setRecipients

public void setRecipients(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 OutputStream getMessageOutputStream()
Description copied from interface: MailEnvelope
Return the OutputStream of the message

Specified by:
getMessageOutputStream in interface MailEnvelope
Returns:
out
See Also:
MailEnvelope.getMessageOutputStream()

getMessageInputStream

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

Specified by:
getMessageInputStream in interface MailEnvelope
Returns:
in
See Also:
MailEnvelope.getMessageInputStream()


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