org.opencms.mail
Class CmsMailHost

java.lang.Object
  extended byorg.opencms.mail.CmsMailHost
All Implemented Interfaces:
java.lang.Comparable

public class CmsMailHost
extends java.lang.Object
implements java.lang.Comparable

Contains the configuration of an individual mail host.

Since:
6.0.0
Version:
$Revision: 1.10 $
Author:
Andreas Zahner

Constructor Summary
CmsMailHost(java.lang.String hostname, java.lang.Integer order, java.lang.String protocol, java.lang.String username, java.lang.String password)
          Creates a new mail host.
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getHostname()
          Returns the host name.
 java.lang.Integer getOrder()
          Returns the order of this mail host.
 java.lang.String getPassword()
          Returns the password used for authentication.
 java.lang.String getProtocol()
          Returns the protocol used for mail sending, default is "smtp".
 java.lang.String getUsername()
          Returns the user name used for authentication.
 int hashCode()
           
 boolean isAuthenticating()
          Returns true only if authentication is enabled, the default is false.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsMailHost

public CmsMailHost(java.lang.String hostname,
                   java.lang.Integer order,
                   java.lang.String protocol,
                   java.lang.String username,
                   java.lang.String password)
Creates a new mail host.

Parameters:
hostname - the name of the mail host
order - the order in which the host is tried
protocol - the protocol to use (default "smtp")
username - the user name to use for authentication
password - the password to use for authentication
Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(java.lang.Object)

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)

getHostname

public java.lang.String getHostname()
Returns the host name.

Returns:
the host name

getOrder

public java.lang.Integer getOrder()
Returns the order of this mail host.

Returns:
the order of this mail host

getPassword

public java.lang.String getPassword()
Returns the password used for authentication.

Returns:
the password used for authentication

getProtocol

public java.lang.String getProtocol()
Returns the protocol used for mail sending, default is "smtp".

Returns:
the protocol used for mail sending

getUsername

public java.lang.String getUsername()
Returns the user name used for authentication.

Returns:
the user name used for authentication

hashCode

public int hashCode()
See Also:
Object.hashCode()

isAuthenticating

public boolean isAuthenticating()
Returns true only if authentication is enabled, the default is false.

Authentication is enabled only if both "username" and "password" are not null.

Returns:
true only if authentication is enabled

toString

public java.lang.String toString()
See Also:
Object.toString()