Class ProtocolException
java.lang.Object
java.lang.Throwable
java.lang.Exception
cloud.opencode.base.email.protocol.ProtocolException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionProtocolException(String message) ProtocolException(String message, int replyCode) ProtocolException(String message, int replyCode, Throwable cause) ProtocolException(String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionintGet the protocol reply code (-1 if not applicable) 获取协议回复码(不适用时为-1)booleanCheck if this is an authentication failure 检查是否为认证失败booleanCheck if this is a connection failure 检查是否为连接失败booleanCheck if this is a connection timeout 检查是否为连接超时Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ProtocolException
-
ProtocolException
-
ProtocolException
-
ProtocolException
-
-
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
-