Class BackendClient


  • public class BackendClient
    extends Object
    BackendClient decorates a ClientWithProxyErrorHandling instance with memorization of connection state, i.e. previous exceptions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void connect()  
      void data​(java.io.InputStream data)
      Sends data to backend server.
      void from​(String from)  
      boolean hasAcceptedRecipient()  
      void quit()
      Sends QUIT command and closes the connection.
      void recipient​(Recipient recipient)  
      • Methods inherited from class java.lang.Object

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

      • BackendClient

        public BackendClient​(BackendServer backendServer)
    • Method Detail

      • hasAcceptedRecipient

        public boolean hasAcceptedRecipient()
      • data

        public void data​(java.io.InputStream data)
                  throws org.subethamail.smtp.RejectException,
                         org.subethamail.smtp.TooMuchDataException,
                         java.io.IOException
        Sends data to backend server. It must not be called if no recipient was accepted previously. It does not memorize an exception coming from the backed server, but DATA is expected to be the last command anyway (except QUIT).
        Throws:
        org.subethamail.smtp.RejectException
        org.subethamail.smtp.TooMuchDataException
        java.io.IOException
      • quit

        public void quit()
        Sends QUIT command and closes the connection. This is allowed in any state.