Package mireka.pop

Class Pop3Exception

    • Field Summary

      Fields 
      Modifier and Type Field Description
      String responseCode
      An extended POP3 response code.
    • Constructor Summary

      Constructors 
      Constructor Description
      Pop3Exception​(String responseCode, String message)
      Constructs a Pop3Exception with the specified response code and human readable message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String toResponse()
      Returns a complete POP3 response line corresponding to this error, which can be sent to the client.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • responseCode

        @Nullable
        public final String responseCode
        An extended POP3 response code.
    • Constructor Detail

      • Pop3Exception

        public Pop3Exception​(String responseCode,
                             String message)
        Constructs a Pop3Exception with the specified response code and human readable message.
        Parameters:
        responseCode - An extended POP3 response code, for example "IN-USE". Frequently this is null, because there are not many standardized POP3 codes, moreover they are useful only if the client program should react differently to different errors.
        message - Human readable message which will be sent to the client.
    • Method Detail

      • toResponse

        public String toResponse()
        Returns a complete POP3 response line corresponding to this error, which can be sent to the client.
        Returns:
        the POP3 response line, which includes the starting -ERR characters, the optional extended response code and the human readable message.