Secure iNet Factory

com.jscape.inspect
Class InvalidEmailException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.jscape.inspect.InvalidEmailException
All Implemented Interfaces:
ExceptionWrapper, java.io.Serializable

public class InvalidEmailException
extends java.lang.Exception
implements ExceptionWrapper

InvalidEmailException is thrown when an email address is found to be invalid. At times, network related issues such as the inability to connect to a DNS or SMTP server during validation will cause an InvalidEmailException to be thrown.

See Also:
Serialized Form

Field Summary
static int DENIED_DOMAIN_ERROR
          Indicates email address contains a denied domain as defined in EmailInspector instance.
static int INVALID_DOMAIN_ERROR
          Indicates email address contains an invalid domain name.
static int INVALID_MX_ERROR
          Indicates error locating SMTP server for email address.
static int INVALID_SYNTAX_ERROR
          Indicates syntax error in email address.
static int INVALID_USER_ERROR
          Indicates invalid user portion of email address.
static int IO_ERROR
          Indicates I/O error communicating with DNS Nameserver or SMTP server.
 
Constructor Summary
InvalidEmailException(java.lang.String email, int errorCode)
          Exception thrown to handle an invalid email.
InvalidEmailException(java.lang.String message, java.lang.String email)
          Creates exception with specified message string.
InvalidEmailException(java.lang.String message, java.lang.String email, java.lang.Exception exception)
          Creates exception with specified message String, email and base exception.
 
Method Summary
 java.lang.String getEmail()
          Gets the EmailAddress associated with this exception.
 int getErrorCode()
          Gets error code associated with error.
 java.lang.Exception getException()
          Gets source of this exception.
 java.lang.String getMessage()
          Gets error message for this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IO_ERROR

public static final int IO_ERROR
Indicates I/O error communicating with DNS Nameserver or SMTP server.

See Also:
Constant Field Values

INVALID_SYNTAX_ERROR

public static final int INVALID_SYNTAX_ERROR
Indicates syntax error in email address.

See Also:
Constant Field Values

DENIED_DOMAIN_ERROR

public static final int DENIED_DOMAIN_ERROR
Indicates email address contains a denied domain as defined in EmailInspector instance.

See Also:
Constant Field Values

INVALID_DOMAIN_ERROR

public static final int INVALID_DOMAIN_ERROR
Indicates email address contains an invalid domain name.

See Also:
Constant Field Values

INVALID_MX_ERROR

public static final int INVALID_MX_ERROR
Indicates error locating SMTP server for email address.

See Also:
Constant Field Values

INVALID_USER_ERROR

public static final int INVALID_USER_ERROR
Indicates invalid user portion of email address.

See Also:
Constant Field Values
Constructor Detail

InvalidEmailException

public InvalidEmailException(java.lang.String message,
                             java.lang.String email)
Creates exception with specified message string.

Parameters:
message - the error message
email - the email address

InvalidEmailException

public InvalidEmailException(java.lang.String message,
                             java.lang.String email,
                             java.lang.Exception exception)
Creates exception with specified message String, email and base exception.

Parameters:
message - the error message
email - the email address
exception - the exception which generated this exception

InvalidEmailException

public InvalidEmailException(java.lang.String email,
                             int errorCode)
Exception thrown to handle an invalid email.

Parameters:
email - the email
errorCode - the type of error encountered
Method Detail

getEmail

public java.lang.String getEmail()
Gets the EmailAddress associated with this exception.

Returns:
the email address

getErrorCode

public int getErrorCode()
Gets error code associated with error.

Returns:
error code
See Also:
IO_ERROR, INVALID_SYNTAX_ERROR, INVALID_DOMAIN_ERROR, DENIED_DOMAIN_ERROR, INVALID_MX_ERROR, INVALID_USER_ERROR

getMessage

public java.lang.String getMessage()
Gets error message for this exception.

Overrides:
getMessage in class java.lang.Throwable
Returns:
error message

getException

public java.lang.Exception getException()
Gets source of this exception.

Specified by:
getException in interface ExceptionWrapper
Returns:
the source of this exception

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved