|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mailster.message.SmtpMessageFactory
public class SmtpMessageFactory
---
Mailster (C) 2007-2009 De Oliveira Edouard
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
See Mailster
Web Site
---
SmtpMessageFactory.java - This class creates a SmtpMessage from an
InputStream.
| Field Summary | |
|---|---|
private java.nio.charset.Charset |
charset
|
private java.nio.charset.CharsetDecoder |
decoder
|
private org.apache.mina.core.buffer.IoBuffer |
delimBuf
|
private boolean |
isHeaderLine
|
private static org.slf4j.Logger |
log
|
private boolean |
previousLineInHeader
Decoding vars. |
| Constructor Summary | |
|---|---|
SmtpMessageFactory()
Creates a new instance with the current default Charset,
the LineDelimiter.CRLF delimiter. |
|
SmtpMessageFactory(java.nio.charset.Charset charset)
Creates a new instance with the specified charset and the LineDelimiter.CRLF delimiter. |
|
SmtpMessageFactory(java.nio.charset.Charset charset,
org.apache.mina.filter.codec.textline.LineDelimiter delimiter)
Creates a new instance with the specified charset and the specified delimiter. |
|
| Method Summary | |
|---|---|
private void |
addRecipientsFromHeader(SmtpMessage msg,
java.util.HashSet<java.lang.String> set,
java.lang.String headerName)
|
SmtpMessage |
asSmtpMessage(java.io.InputStream data,
java.util.List<java.lang.String> recipients)
|
private boolean |
consume(SmtpMessage msg,
org.apache.mina.core.buffer.IoBuffer in)
|
private void |
reset()
|
private void |
updateMessage(SmtpMessage msg,
org.apache.mina.core.buffer.IoBuffer in)
Stores the data in the SmtpMessage body. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static org.slf4j.Logger log
private org.apache.mina.core.buffer.IoBuffer delimBuf
private java.nio.charset.Charset charset
private java.nio.charset.CharsetDecoder decoder
private boolean previousLineInHeader
private boolean isHeaderLine
| Constructor Detail |
|---|
public SmtpMessageFactory()
Charset,
the LineDelimiter.CRLF delimiter.
public SmtpMessageFactory(java.nio.charset.Charset charset)
LineDelimiter.CRLF delimiter.
public SmtpMessageFactory(java.nio.charset.Charset charset,
org.apache.mina.filter.codec.textline.LineDelimiter delimiter)
| Method Detail |
|---|
private void reset()
public SmtpMessage asSmtpMessage(java.io.InputStream data,
java.util.List<java.lang.String> recipients)
throws java.lang.Exception
java.lang.Exception
private void addRecipientsFromHeader(SmtpMessage msg,
java.util.HashSet<java.lang.String> set,
java.lang.String headerName)
private void updateMessage(SmtpMessage msg,
org.apache.mina.core.buffer.IoBuffer in)
throws java.lang.Exception
SmtpMessage body.
java.lang.Exception
private boolean consume(SmtpMessage msg,
org.apache.mina.core.buffer.IoBuffer in)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||