Package ome.services.mail
Class MapAnnotationSubethaListener
- java.lang.Object
-
- ome.services.mail.MapAnnotationSubethaListener
-
- All Implemented Interfaces:
org.subethamail.smtp.helper.SimpleMessageListener
public class MapAnnotationSubethaListener extends java.lang.Object implements org.subethamail.smtp.helper.SimpleMessageListener
BasicSimpleMessageListener
which stores all received emails asMapAnnotation
instances belong to root with the namespaceNAMESPACE
. The description of the annotation is the body of the text and two fields are set with the keysFROM
andTO
.- Since:
- 5.1.0
-
-
Constructor Summary
Constructors Constructor Description MapAnnotationSubethaListener(Executor executor, java.lang.String uuid)
MapAnnotationSubethaListener(Executor executor, ome.system.Principal principal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 withNAMESPACE
set.protected java.lang.String
parseStream(java.io.InputStream is)
-
-
-
Field Detail
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
FROM
public static final java.lang.String FROM
- See Also:
- Constant Field Values
-
TO
public static final java.lang.String TO
- See Also:
- Constant Field Values
-
-
Method Detail
-
accept
public boolean accept(java.lang.String arg0, java.lang.String arg1)
Accepts all mails.- Specified by:
accept
in interfaceorg.subethamail.smtp.helper.SimpleMessageListener
-
deliver
public void deliver(java.lang.String from, java.lang.String recipient, java.io.InputStream stream) throws org.subethamail.smtp.TooMuchDataException, java.io.IOException
Stores each email as a map annotation withNAMESPACE
set.- Specified by:
deliver
in interfaceorg.subethamail.smtp.helper.SimpleMessageListener
- Throws:
org.subethamail.smtp.TooMuchDataException
java.io.IOException
-
parseStream
protected java.lang.String parseStream(java.io.InputStream is)
-
-