Package org.apache.james.services

Examples of org.apache.james.services.DNSServer


     *
     * @param host
     */
    public Collection getMailServers( String host )
    {
        DNSServer dnsServer = null;
        try {
            dnsServer = ( DNSServer ) compMgr.lookup( DNSServer.ROLE );
        }
        catch ( final ComponentException cme ) {
            getLogger().error( "Fatal configuration error - DNS Servers lost!", cme );
            throw new RuntimeException( "Fatal configuration error - DNS Servers lost!" );
        }
        return dnsServer.findMXRecords( host );
    }
View Full Code Here


     *
     * @param host
     */
    public Collection getMailServers( String host )
    {
        DNSServer dnsServer = null;
        try {
            dnsServer = ( DNSServer ) compMgr.lookup( DNSServer.ROLE );
        }
        catch ( final ComponentException cme ) {
            getLogger().error( "Fatal configuration error - DNS Servers lost!", cme );
            throw new RuntimeException( "Fatal configuration error - DNS Servers lost!" );
        }
        return dnsServer.findMXRecords( host );
    }
View Full Code Here

     *
     * @param host
     */
    public Collection getMailServers( String host )
    {
        DNSServer dnsServer = null;
        try {
            dnsServer = ( DNSServer ) compMgr.lookup( DNSServer.ROLE );
        }
        catch ( final ComponentException cme ) {
            getLogger().error( "Fatal configuration error - DNS Servers lost!", cme );
            throw new RuntimeException( "Fatal configuration error - DNS Servers lost!" );
        }
        return dnsServer.findMXRecords( host );
    }
View Full Code Here

        m_serviceManager.put(MailServer.ROLE, m_mailServer);
        m_serviceManager.put(UsersRepository.ROLE, m_usersRepository);
        m_serviceManager.put(SocketManager.ROLE, new MockSocketManager(m_smtpListenerPort));
        m_serviceManager.put(ThreadManager.ROLE, new MockThreadManager());
        // Mock DNS Server
        DNSServer dns = new DNSServer() {

            public Collection findMXRecords(String hostname) {
                List res = new ArrayList();
                if (hostname == null) {
                    return res;
View Full Code Here

     * <p>TODO: This needs to be made a more specific ordered subtype of Collection.</p>
     *
     * @param host
     */
    public Collection getMailServers(String host) {
        DNSServer dnsServer = null;
        try {
            dnsServer = (DNSServer) compMgr.lookup( DNSServer.ROLE );
        } catch ( final ServiceException cme ) {
            getLogger().error("Fatal configuration error - DNS Servers lost!", cme );
            throw new RuntimeException("Fatal configuration error - DNS Servers lost!");
        }
        return dnsServer.findMXRecords(host);
    }
View Full Code Here

     * @since Mailet API v2.2.0a16-unstable
     * @param domainName - the domain for which to find mail servers
     * @return an Iterator over HostAddress instances, sorted by priority
     */
    public Iterator getSMTPHostAddresses(String domainName) {
        DNSServer dnsServer = null;
        try {
            dnsServer = (DNSServer) compMgr.lookup( DNSServer.ROLE );
        } catch ( final ServiceException cme ) {
            getLogger().error("Fatal configuration error - DNS Servers lost!", cme );
            throw new RuntimeException("Fatal configuration error - DNS Servers lost!");
        }
        return dnsServer.getSMTPHostAddresses(domainName);
    }
View Full Code Here

     * <p>TODO: This needs to be made a more specific ordered subtype of Collection.</p>
     *
     * @param host
     */
    public Collection getMailServers(String host) {
        DNSServer dnsServer = null;
        try {
            dnsServer = (DNSServer) compMgr.lookup( DNSServer.ROLE );
        } catch ( final ServiceException cme ) {
            getLogger().error("Fatal configuration error - DNS Servers lost!", cme );
            throw new RuntimeException("Fatal configuration error - DNS Servers lost!");
        }
        return dnsServer.findMXRecords(host);
    }
View Full Code Here

     * @since Mailet API v2.2.0a16-unstable
     * @param domainName - the domain for which to find mail servers
     * @return an Iterator over HostAddress instances, sorted by priority
     */
    public Iterator getSMTPHostAddresses(String domainName) {
        DNSServer dnsServer = null;
        try {
            dnsServer = (DNSServer) compMgr.lookup( DNSServer.ROLE );
        } catch ( final ServiceException cme ) {
            getLogger().error("Fatal configuration error - DNS Servers lost!", cme );
            throw new RuntimeException("Fatal configuration error - DNS Servers lost!");
        }
        return dnsServer.getSMTPHostAddresses(domainName);
    }
View Full Code Here

        m_serviceManager.put(MailServer.ROLE, m_mailServer);
        m_serviceManager.put(UsersRepository.ROLE, m_usersRepository);
        m_serviceManager.put(SocketManager.ROLE, new MockSocketManager(m_smtpListenerPort));
        m_serviceManager.put(ThreadManager.ROLE, new MockThreadManager());
        // Mock DNS Server
        DNSServer dns = new DNSServer() {

            public Collection findMXRecords(String hostname) {
                List res = new ArrayList();
                if (hostname == null) {
                    return res;
View Full Code Here

TOP

Related Classes of org.apache.james.services.DNSServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.