KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jsmtpd > core > common > dnsService > IDNSResolver


1 /*
2  *
3  * Jsmtpd, Java SMTP daemon
4  * Copyright (C) 2005 Jean-Francois POUX, jf.poux@laposte.net
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  *
20  */

21 package org.jsmtpd.core.common.dnsService;
22
23 import java.net.InetAddress JavaDoc;
24 import java.util.List JavaDoc;
25
26 import org.jsmtpd.core.common.IGenericPlugin;
27
28 /**
29  * DNS resolving service<br>
30  * handles MX requests
31  * @see org.jsmtpd.plugins.dnsServices.DNSJavaResolver
32  * @author Jean-Francois POUX
33  */

34 public interface IDNSResolver extends IGenericPlugin {
35
36     /**
37      *
38      * @param name domain name of rcpt
39      * @return a list containing the ip addresse of th MX servers, firts => top priority, last => lowest priority
40      *
41      */

42     public List JavaDoc<InetAddress JavaDoc> doMXLookup(String JavaDoc name);
43
44     /**
45      * Checks if a domain name exists
46      * @param name the domain name to check
47      * @return true if exists, false if not
48      */

49
50     public boolean exists(String JavaDoc name);
51
52     /**
53      * Resolve to ip address
54      * @param name the domain name to check
55      * @return the ip address of the domain name, null if it does not exists
56      */

57     public InetAddress JavaDoc doLookupToIp(String JavaDoc name);
58
59     /**
60      * Reverse lookup of an ip addr to domain name
61      * @param in ip adress
62      * @return the domain name
63      */

64     public String JavaDoc doReverseLookup(InetAddress JavaDoc in);
65
66 }
Popular Tags