Class ProtocolException

java.lang.Object
java.lang.Throwable
java.lang.Exception
cloud.opencode.base.email.protocol.ProtocolException
All Implemented Interfaces:
Serializable

public class ProtocolException extends Exception
Protocol-level Exception 协议层异常

Thrown when a mail protocol operation fails at the transport level.

当邮件协议操作在传输层失败时抛出。

Since:
JDK 25, opencode-base-email V1.0.3
Author:
Leon Soo
See Also:
  • Constructor Details

    • ProtocolException

      public ProtocolException(String message)
    • ProtocolException

      public ProtocolException(String message, Throwable cause)
    • ProtocolException

      public ProtocolException(String message, int replyCode)
    • ProtocolException

      public ProtocolException(String message, int replyCode, Throwable cause)
  • Method Details

    • getReplyCode

      public int getReplyCode()
      Get the protocol reply code (-1 if not applicable) 获取协议回复码(不适用时为-1)
      Returns:
      the reply code | 回复码
    • isAuthenticationFailure

      public boolean isAuthenticationFailure()
      Check if this is an authentication failure 检查是否为认证失败
      Returns:
      true if authentication failed | 认证失败返回true
    • isTimeout

      public boolean isTimeout()
      Check if this is a connection timeout 检查是否为连接超时
      Returns:
      true if timeout | 超时返回true
    • isConnectionFailure

      public boolean isConnectionFailure()
      Check if this is a connection failure 检查是否为连接失败
      Returns:
      true if connection failed | 连接失败返回true