public class MapAnnotationSubethaListener
extends java.lang.Object
implements org.subethamail.smtp.helper.SimpleMessageListener
SimpleMessageListener which stores all received emails as
MapAnnotation instances belong to root with the namespace
NAMESPACE. The description of the annotation is the body of the
text and two fields are set with the keys FROM and TO.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FROM |
static java.lang.String |
NAMESPACE |
static java.lang.String |
TO |
| Constructor and Description |
|---|
MapAnnotationSubethaListener(Executor executor,
ome.system.Principal principal) |
MapAnnotationSubethaListener(Executor executor,
java.lang.String uuid) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.lang.String arg0,
java.lang.String arg1)
Accepts all mails.
|
void |
deliver(java.lang.String from,
java.lang.String recipient,
java.io.InputStream stream)
Stores each email as a map annotation with
NAMESPACE set. |
protected java.lang.String |
parseStream(java.io.InputStream is) |
public static final java.lang.String NAMESPACE
public static final java.lang.String FROM
public static final java.lang.String TO
public MapAnnotationSubethaListener(Executor executor, ome.system.Principal principal)
public MapAnnotationSubethaListener(Executor executor, java.lang.String uuid)
public boolean accept(java.lang.String arg0,
java.lang.String arg1)
accept in interface org.subethamail.smtp.helper.SimpleMessageListenerpublic void deliver(java.lang.String from,
java.lang.String recipient,
java.io.InputStream stream)
throws org.subethamail.smtp.TooMuchDataException,
java.io.IOException
NAMESPACE set.deliver in interface org.subethamail.smtp.helper.SimpleMessageListenerorg.subethamail.smtp.TooMuchDataExceptionjava.io.IOExceptionprotected java.lang.String parseStream(java.io.InputStream is)