Top Description Fields Constructors Methods
com.sun.mail.util

public Class SocketConnectException

extends IOException
Class Inheritance
Imports
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.
Author
Bill Shannon
Since
JavaMail 1.5.0
See Also
java.net.ConnectException

Field Summary

Modifier and TypeField and Description
private int
cto

The connection timeout.

private String
host

The socket host name.

private int
port

The socket port.

private static final long

Constructor Summary

AccessConstructor and Description
public
SocketConnectException(String
error message detail
msg
,
Exception
the underlying exception that indicates the failure
cause
,
String
the host we were trying to connect to
host
,
int
the port we were trying to connect to
port
,
int
the timeout for the connection attempt
cto
)

Constructs a SocketConnectException.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the connection timeout
getConnectionTimeout
()

The timeout used for the connection attempt.

public Exception

Returns:

the exception
getException
()

The exception that caused the failure.

public String

Returns:

the host
getHost
()

The host we were trying to connect to.

public int

Returns:

the port
getPort
()

The port we were trying to connect to.

Field Detail

ctoback to summary
private int cto

The connection timeout.

hostback to summary
private String host

The socket host name.

portback to summary
private int port

The socket port.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.io.IOException.serialVersionUID.

The generated serial id.

Constructor Detail

SocketConnectExceptionback to summary
public SocketConnectException(String msg, Exception cause, String host, int port, int cto)

Constructs a SocketConnectException.

Parameters
msg:String

error message detail

cause:Exception

the underlying exception that indicates the failure

host:String

the host we were trying to connect to

port:int

the port we were trying to connect to

cto:int

the timeout for the connection attempt

Method Detail

getConnectionTimeoutback to summary
public int getConnectionTimeout()

The timeout used for the connection attempt.

Returns:int

the connection timeout

getExceptionback to summary
public Exception getException()

The exception that caused the failure.

Returns:Exception

the exception

getHostback to summary
public String getHost()

The host we were trying to connect to.

Returns:String

the host

getPortback to summary
public int getPort()

The port we were trying to connect to.

Returns:int

the port