public class MapAnnotationSubethaListener extends 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 String |
FROM |
static String |
NAMESPACE |
static String |
TO |
Constructor and Description |
---|
MapAnnotationSubethaListener(Executor executor,
Principal principal) |
MapAnnotationSubethaListener(Executor executor,
String uuid) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(String arg0,
String arg1)
Accepts all mails.
|
void |
deliver(String from,
String recipient,
InputStream stream)
Stores each email as a map annotation with
NAMESPACE set. |
protected String |
parseStream(InputStream is) |
public static final String NAMESPACE
public static final String FROM
public static final String TO
public MapAnnotationSubethaListener(Executor executor, Principal principal)
public boolean accept(String arg0, String arg1)
accept
in interface org.subethamail.smtp.helper.SimpleMessageListener
public void deliver(String from, String recipient, InputStream stream) throws org.subethamail.smtp.TooMuchDataException, IOException
NAMESPACE
set.deliver
in interface org.subethamail.smtp.helper.SimpleMessageListener
org.subethamail.smtp.TooMuchDataException
IOException
protected String parseStream(InputStream is)
Version: 5.2.8-ice35-b57
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.