Class MapAnnotationSubethaListener

  • All Implemented Interfaces:
    org.subethamail.smtp.helper.SimpleMessageListener

    public class MapAnnotationSubethaListener
    extends java.lang.Object
    implements org.subethamail.smtp.helper.SimpleMessageListener
    Basic 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.
    Since:
    5.1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FROM  
      static java.lang.String NAMESPACE  
      static java.lang.String TO  
    • 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 with NAMESPACE set.
      protected java.lang.String parseStream​(java.io.InputStream is)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapAnnotationSubethaListener

        public MapAnnotationSubethaListener​(Executor executor,
                                            ome.system.Principal principal)
      • MapAnnotationSubethaListener

        public MapAnnotationSubethaListener​(Executor executor,
                                            java.lang.String uuid)
    • Method Detail

      • accept

        public boolean accept​(java.lang.String arg0,
                              java.lang.String arg1)
        Accepts all mails.
        Specified by:
        accept in interface org.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 with NAMESPACE set.
        Specified by:
        deliver in interface org.subethamail.smtp.helper.SimpleMessageListener
        Throws:
        org.subethamail.smtp.TooMuchDataException
        java.io.IOException
      • parseStream

        protected java.lang.String parseStream​(java.io.InputStream is)