Package com.sun.mail.util
Class SocketConnectException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.sun.mail.util.SocketConnectException
- All Implemented Interfaces:
Serializable
An IOException that indicates a socket connection attempt failed.
Unlike java.net.ConnectException, it includes details of what we
were trying to connect to.
- Since:
- JavaMail 1.5.0
- Author:
- Bill Shannon
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSocketConnectException
(String msg, Exception cause, String host, int port, int cto) Constructs a SocketConnectException. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SocketConnectException
Constructs a SocketConnectException.- Parameters:
msg
- error message detailcause
- the underlying exception that indicates the failurehost
- the host we were trying to connect toport
- the port we were trying to connect tocto
- the timeout for the connection attempt
-
-
Method Details
-
getException
The exception that caused the failure.- Returns:
- the exception
-
getHost
The host we were trying to connect to.- Returns:
- the host
-
getPort
public int getPort()The port we were trying to connect to.- Returns:
- the port
-
getConnectionTimeout
public int getConnectionTimeout()The timeout used for the connection attempt.- Returns:
- the connection timeout
-