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.SimpleMessageListenerBasicSimpleMessageListenerwhich stores all received emails asMapAnnotationinstances belong to root with the namespaceNAMESPACE. The description of the annotation is the body of the text and two fields are set with the keysFROMandTO.- 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 booleanaccept(java.lang.String arg0, java.lang.String arg1)Accepts all mails.voiddeliver(java.lang.String from, java.lang.String recipient, java.io.InputStream stream)Stores each email as a map annotation withNAMESPACEset.protected java.lang.StringparseStream(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:
acceptin 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.IOExceptionStores each email as a map annotation withNAMESPACEset.- Specified by:
deliverin interfaceorg.subethamail.smtp.helper.SimpleMessageListener- Throws:
org.subethamail.smtp.TooMuchDataExceptionjava.io.IOException
-
parseStream
protected java.lang.String parseStream(java.io.InputStream is)
-
-