james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r801798 - in /james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf: core/Inet6Util.java executor/IResponseQueue.java executor/StagedMultipleSPFExecutor.java
Date Thu, 06 Aug 2009 20:02:00 GMT
Author: norman
Date: Thu Aug  6 20:02:00 2009
New Revision: 801798

URL: http://svn.apache.org/viewvc?rev=801798&view=rev
Log:
more generify (JSPF-78)

Modified:
    james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/core/Inet6Util.java
    james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/IResponseQueue.java
    james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/StagedMultipleSPFExecutor.java

Modified: james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/core/Inet6Util.java
URL: http://svn.apache.org/viewvc/james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/core/Inet6Util.java?rev=801798&r1=801797&r2=801798&view=diff
==============================================================================
--- james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/core/Inet6Util.java (original)
+++ james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/core/Inet6Util.java Thu
Aug  6 20:02:00 2009
@@ -64,8 +64,8 @@
 
         StringTokenizer tokenizer = new StringTokenizer(ipAddressString, ":.",
                 true);
-        ArrayList hexStrings = new ArrayList();
-        ArrayList decStrings = new ArrayList();
+        ArrayList<String> hexStrings = new ArrayList<String>();
+        ArrayList<String> decStrings = new ArrayList<String>();
         String token = "";
         String prevToken = "";
         int doubleColonIndex = -1; // If a double colon exists, we need to

Modified: james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/IResponseQueue.java
URL: http://svn.apache.org/viewvc/james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/IResponseQueue.java?rev=801798&r1=801797&r2=801798&view=diff
==============================================================================
--- james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/IResponseQueue.java
(original)
+++ james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/IResponseQueue.java
Thu Aug  6 20:02:00 2009
@@ -26,7 +26,7 @@
  * Queue implementation which is used to manage IResponse
  *
  */
-public interface IResponseQueue extends List {
+public interface IResponseQueue extends List<IResponse> {
     
     /**
      * Return the last IResponse in the queue. If the queue is empty it will

Modified: james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/StagedMultipleSPFExecutor.java
URL: http://svn.apache.org/viewvc/james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/StagedMultipleSPFExecutor.java?rev=801798&r1=801797&r2=801798&view=diff
==============================================================================
--- james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/StagedMultipleSPFExecutor.java
(original)
+++ james/jspf/trunk/resolver/src/main/java/org/apache/james/jspf/executor/StagedMultipleSPFExecutor.java
Thu Aug  6 20:02:00 2009
@@ -42,7 +42,7 @@
 
     private static final String ATTRIBUTE_STAGED_EXECUTOR_CONTINUATION = "StagedMultipleSPFExecutor.continuation";
 
-    private static class ResponseQueueImpl extends LinkedList implements IResponseQueue {
+    private static class ResponseQueueImpl extends LinkedList<IResponse> implements
IResponseQueue {
 
         private static final long serialVersionUID = 5714025260393791651L;
         
@@ -86,8 +86,8 @@
     private Logger log;
     private DNSAsynchLookupService dnsProbe;
     private Thread worker;
-    private Map sessions;
-    private Map results;
+    private Map<Integer,SPFSession> sessions;
+    private Map<Integer,FutureSPFResult>results;
     private ResponseQueueImpl responseQueue;
 
     public StagedMultipleSPFExecutor(Logger log, DNSAsynchLookupService service) {
@@ -96,8 +96,8 @@
 
         this.responseQueue = new ResponseQueueImpl();
 
-        this.sessions = Collections.synchronizedMap(new HashMap());
-        this.results = Collections.synchronizedMap(new HashMap());
+        this.sessions = Collections.synchronizedMap(new HashMap<Integer,SPFSession>());
+        this.results = Collections.synchronizedMap(new HashMap<Integer,FutureSPFResult>());
 
         this.worker = new Thread(this);
         this.worker.setDaemon(true);
@@ -174,9 +174,9 @@
             
             IResponse resp = responseQueue.removeResponse();
             
-            Integer respId = (Integer) resp.getId();
-            SPFSession session = (SPFSession) sessions.remove(respId);
-            FutureSPFResult result = (FutureSPFResult) results.remove(respId);
+            Integer respId = (Integer)resp.getId();
+            SPFSession session = sessions.remove(respId);
+            FutureSPFResult result = results.remove(respId);
             
             DNSLookupContinuation cont = (DNSLookupContinuation) session.getAttribute(ATTRIBUTE_STAGED_EXECUTOR_CONTINUATION);
             



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message