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

public Class MailConnectException

extends MessagingException
Class Inheritance
Imports
javax.mail.MessagingException

A MessagingException that indicates a socket connection attempt failed. Unlike java.net.ConnectException, it includes details of what we were trying to connect to. The underlying exception is available as the "cause" of this exception.
Author
Bill Shannon
Since
JavaMail 1.5.0
See Also
java.net.ConnectException

Field Summary

Modifier and TypeField and Description
private int
private String
private int
private static final long

Constructor Summary

AccessConstructor and Description
public
MailConnectException(SocketConnectException
the SocketConnectException with the details
cex
)

Constructs a MailConnectException.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the connection timeout
getConnectionTimeout
()

The timeout used for the connection attempt.

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.

Inherited from javax.mail.MessagingException:
getCausegetNextExceptionsetNextExceptiontoString

Field Detail

ctoback to summary
private int cto
hostback to summary
private String host
portback to summary
private int port
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.mail.MessagingException.serialVersionUID.

Constructor Detail

MailConnectExceptionback to summary
public MailConnectException(SocketConnectException cex)

Constructs a MailConnectException.

Parameters
cex:SocketConnectException

the SocketConnectException with the details

Method Detail

getConnectionTimeoutback to summary
public int getConnectionTimeout()

The timeout used for the connection attempt.

Returns:int

the connection timeout

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