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:
java.io.Serializable
public class SocketConnectException extends java.io.IOException
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
- See Also:
ConnectException
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
cto
The connection timeout.private java.lang.String
host
The socket host name.private int
port
The socket port.private static long
serialVersionUID
The generated serial id.
-
Constructor Summary
Constructors Constructor Description SocketConnectException(java.lang.String msg, java.lang.Exception cause, java.lang.String host, int port, int cto)
Constructs a SocketConnectException.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getConnectionTimeout()
The timeout used for the connection attempt.java.lang.Exception
getException()
The exception that caused the failure.java.lang.String
getHost()
The host we were trying to connect to.int
getPort()
The port we were trying to connect to.
-
-
-
Field Detail
-
host
private java.lang.String host
The socket host name.
-
port
private int port
The socket port.
-
cto
private int cto
The connection timeout.
-
serialVersionUID
private static final long serialVersionUID
The generated serial id.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SocketConnectException
public SocketConnectException(java.lang.String msg, java.lang.Exception cause, java.lang.String host, int port, int cto)
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 Detail
-
getException
public java.lang.Exception getException()
The exception that caused the failure.- Returns:
- the exception
-
getHost
public java.lang.String 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
-
-