001    package railo.runtime.net.mail;
002    
003    /**
004     * DTO of a single Mailserver
005     */
006    public interface Server {
007    
008            public static final int DEFAULT_PORT = 25;
009            
010        /**
011         * @return Returns the password.
012         */
013        public abstract String getPassword();
014    
015        /**
016         * @return Returns the port.
017         */
018        public abstract int getPort();
019    
020        /**
021         * @return Returns the server.
022         */
023        public abstract String getHostName();
024    
025        /**
026         * @return Returns the username.
027         */
028        public abstract String getUsername();
029    
030        /**
031         * @return if has a authenatication or not
032         */
033        public abstract boolean hasAuthentication();
034    
035        /**
036         * @return clone the DataSource as ReadOnly
037         */
038        public abstract Server cloneReadOnly();
039    
040        /**
041         * @return Returns the readOnly.
042         */
043        public abstract boolean isReadOnly();
044    
045        /**
046         * verify the server properties 
047         * @return is ok
048         * @throws SMTPException 
049         */
050        public abstract boolean verify() throws SMTPException;
051    
052        
053            /**
054             * @return is tls
055             */
056            public abstract boolean isTLS();
057    
058            /**
059             * @return is ssl
060             */
061            public abstract boolean isSSL();
062    
063    }