Author: norman
Date: Sat May 27 10:23:31 2006
New Revision: 409843
URL: http://svn.apache.org/viewvc?rev=409843&view=rev
Log:
Add and correct more javadocs
Modified:
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java
james/jspf/trunk/src/main/java/org/apache/james/jspf/core/DNSService.java
james/jspf/trunk/src/main/java/org/apache/james/jspf/core/IPAddr.java
Modified:
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java
URL:
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java?rev=409843&r1=409842&r2=409843&view=diff
==============================================================================
---
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java
(original)
+++
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java
Sat May 27 10:23:31 2006
@@ -105,8 +105,7 @@
* @throws NoneException
* if none TXT-Records were found.
* @throws TempErrorException
- * if the lookup result was not "HOST NOT FOUND" or
- * "SUCCESSFULLY"
+ * if the lookup result was "TRY_AGAIN"
* @throws PermErrorException
* if an PermError should be returned
*/
@@ -389,7 +388,7 @@
* ips
* @param mask
* The netmask
- * @return ipAddresses
+ * @return ipAddresses Array which contains all ipAddresses
*/
private static ArrayList getIPList(String host, int mask)
throws PermErrorException {
@@ -417,8 +416,7 @@
* @throws NoneException
* if no MX-Records was found
* @throws TempErrorException
- * if the lookup result was not "HOST NOT FOUND" or
- * "SUCCESSFULLY"
+ * if the lookup result was "TRY_AGAIN"
*/
private static ArrayList getMXNames(String host) throws NoneException,
TempErrorException {
Modified:
james/jspf/trunk/src/main/java/org/apache/james/jspf/core/DNSService.java
URL:
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/core/DNSService.java?rev=409843&r1=409842&r2=409843&view=diff
==============================================================================
--- james/jspf/trunk/src/main/java/org/apache/james/jspf/core/DNSService.java
(original)
+++ james/jspf/trunk/src/main/java/org/apache/james/jspf/core/DNSService.java
Sat May 27 10:23:31 2006
@@ -47,8 +47,7 @@
* @throws NoneException
* if no SPF-Record was found.
* @throws TempErrorException
- * if the lookup result was not "HOST NOT FOUND" or
- * "SUCCESSFULLY"
+ * if the lookup result was "TRY_AGAIN"
*/
public String getSpfRecord(String hostname, String spfVersion)
throws PermErrorException, NoneException, TempErrorException;
@@ -66,8 +65,7 @@
* @throws PermErrorException
* if an PermError should be returned
* @throws TempErrorException
- * if the lookup result was not "HOST NOT FOUND" or
- * "SUCCESSFULLY"
+ * if the lookup result was "TRY_AGAIN"
*/
public List getARecords(String strServer, int mask) throws NoneException,
PermErrorException, TempErrorException;
@@ -85,8 +83,7 @@
* @throws PermErrorException
* if an PermError should be returned
* @throws TempErrorException
- * if the lookup result was not "HOST NOT FOUND" or
- * "SUCCESSFULLY"
+ * if the lookup result was "TRY_AGAIN"
*/
public List getAAAARecords(String strServer, int mask)
throws NoneException, PermErrorException, TempErrorException;
@@ -102,8 +99,7 @@
* @throws PermErrorException
* if the hostname is not resolvable
* @throws TempErrorException
- * if the lookup result was not "HOST NOT FOUND" or
- * "SUCCESSFULLY"
+ * if the lookup result was "TRY_AGAIN"
*/
public String getTxtCatType(String strServer) throws NoneException,
PermErrorException, TempErrorException;
@@ -119,8 +115,7 @@
* @throws PermErrorException
* if an PermError should be returned
* @throws TempErrorException
- * if the lookup result was not "HOST NOT FOUND" or
- * "SUCCESSFULLY"
+ * if the lookup result was "TRY_AGAIN"
*/
public List getPTRRecords(String ipAddress) throws PermErrorException,
@@ -139,8 +134,7 @@
* @throws PermErrorException
* if an PermError should be returned
* @throws TempErrorException
- * if the lookup result was not "HOST NOT FOUND" or
- * "SUCCESSFULLY"
+ * if the lookup result was "TRY_AGAIN"
*/
public List getMXRecords(String domainName, int mask)
throws PermErrorException, NoneException, TempErrorException;
Modified: james/jspf/trunk/src/main/java/org/apache/james/jspf/core/IPAddr.java
URL:
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/core/IPAddr.java?rev=409843&r1=409842&r2=409843&view=diff
==============================================================================
--- james/jspf/trunk/src/main/java/org/apache/james/jspf/core/IPAddr.java
(original)
+++ james/jspf/trunk/src/main/java/org/apache/james/jspf/core/IPAddr.java Sat
May 27 10:23:31 2006
@@ -61,7 +61,7 @@
* The hostname or ip we want to retrieve the ipaddresses for
* @param mask
* The netmask
- * @return ipAddresses
+ * @return ipAddresses An Arraylist which contains all ipAddresses
* @throws PermErrorException
* on error
*/
@@ -84,7 +84,7 @@
* The ipAddress given as String
* @param maskLength
* The netmask
- * @return IpAddress
+ * @return IpAddress AAn Arraylist which contains all ipAddresses
* @throws PermErrorException
* on error
*/
@@ -186,7 +186,7 @@
*
* @param data
* The String where the dot should removed
- * @return modified String
+ * @return modified The Given String with last char stripped
*/
public static String stripDot(String data) {
@@ -228,6 +228,12 @@
}
}
+ /**
+ * Return the Hexdecimal representation of the given long value
+ *
+ * @param data The value to retrieve the Hexdecimal for
+ * @return The Hexdecimal representation of the given value
+ */
private String getHex(long data) {
StringBuffer fullHex = new StringBuffer();
fullHex.append("0000" + Long.toHexString(data).toUpperCase());
@@ -247,7 +253,7 @@
*
* @param addressData
* The int Array
- * @return ipAddress
+ * @return ipAddress The ipAddress
*/
private String getIPAddress(int[] addressData) {
StringBuffer createAddress = new StringBuffer();
@@ -274,10 +280,19 @@
return createAddress.toString();
}
+ /**
+ *
+ * @see #getIPAddress(int[])
+ */
public String getMaskedIPAddress() {
return getIPAddress(maskedAddress(address, mask));
}
+ /**
+ * Get the maskAddress
+ *
+ * @return The maskAddress
+ */
public String getMaskAddress() {
if (ipLength == 4) {
return getIPAddress(get8BitAddress(mask));
@@ -288,7 +303,8 @@
/**
* Return the NibbleFormat of the IPAddr
- * @return ipAddress
+ *
+ * @return ipAddress The ipAddress in nibbleFormat
*/
public String getNibbleFormat() {
StringBuffer sb = new StringBuffer();
@@ -374,6 +390,7 @@
return maskLength;
}
+
public String toString() {
return getIPAddress();
}
@@ -420,7 +437,8 @@
}
/**
- * Retrun if the given ipAddress is ipv6
+ * Return if the given ipAddress is ipv6
+ *
* @param ip The ipAddress
* @return true or false
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]