james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r531373 - in /james/jspf/branches/asynch-jspf/src: main/java/org/apache/james/jspf/core/ main/java/org/apache/james/jspf/impl/ test/java/org/apache/james/jspf/
Date Mon, 23 Apr 2007 08:23:36 GMT
Author: norman
Date: Mon Apr 23 01:23:34 2007
New Revision: 531373

URL: http://svn.apache.org/viewvc?view=rev&rev=531373
Log:
Move IResponse implementation to the right package and tree

Added:
    james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/IResponseImpl.java
  (with props)
Removed:
    james/jspf/branches/asynch-jspf/src/test/java/org/apache/james/jspf/ResponseImpl.java
Modified:
    james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/impl/DNSServiceXBillImpl.java
    james/jspf/branches/asynch-jspf/src/test/java/org/apache/james/jspf/AbstractYamlTest.java

Added: james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/IResponseImpl.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/IResponseImpl.java?view=auto&rev=531373
==============================================================================
--- james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/IResponseImpl.java
(added)
+++ james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/IResponseImpl.java
Mon Apr 23 01:23:34 2007
@@ -0,0 +1,46 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.jspf.core;
+
+
+import java.util.List;
+
+public class IResponseImpl implements IResponse {
+    private Exception exception = null;
+    private List value = null;
+    private Object id = null;
+    public IResponseImpl(Object id, Exception e) {
+        this.exception = e;
+        this.id = id;
+    }
+    public IResponseImpl(Object id, List result) {
+        this.value = result;
+        this.id = id;
+    }
+    public Exception getException() {
+        return exception;
+    }
+    public Object getId() {
+        return id;
+    }
+    public Object getValue() {
+        return value;
+    }
+}
\ No newline at end of file

Propchange: james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/core/IResponseImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/impl/DNSServiceXBillImpl.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/impl/DNSServiceXBillImpl.java?view=diff&rev=531373&r1=531372&r2=531373
==============================================================================
--- james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/impl/DNSServiceXBillImpl.java
(original)
+++ james/jspf/branches/asynch-jspf/src/main/java/org/apache/james/jspf/impl/DNSServiceXBillImpl.java
Mon Apr 23 01:23:34 2007
@@ -19,11 +19,11 @@
 
 package org.apache.james.jspf.impl;
 
-import org.apache.james.jspf.ResponseImpl;
 import org.apache.james.jspf.core.DNSService;
 import org.apache.james.jspf.core.IPAddr;
 import org.apache.james.jspf.core.Logger;
 import org.apache.james.jspf.core.IResponseQueue;
+import org.apache.james.jspf.core.IResponseImpl;
 import org.xbill.DNS.AAAARecord;
 import org.xbill.DNS.ARecord;
 import org.xbill.DNS.Lookup;
@@ -197,9 +197,9 @@
     public void getRecordsAsynch(String hostname, int recordType, Object id,
             IResponseQueue responsePool) {
         try {
-            responsePool.insertResponse(new ResponseImpl(id, getRecords(hostname, recordType)));
+            responsePool.insertResponse(new IResponseImpl(id, getRecords(hostname, recordType)));
         } catch (TimeoutException e) {
-            responsePool.insertResponse(new ResponseImpl(id, e));
+            responsePool.insertResponse(new IResponseImpl(id, e));
         }
 
     }

Modified: james/jspf/branches/asynch-jspf/src/test/java/org/apache/james/jspf/AbstractYamlTest.java
URL: http://svn.apache.org/viewvc/james/jspf/branches/asynch-jspf/src/test/java/org/apache/james/jspf/AbstractYamlTest.java?view=diff&rev=531373&r1=531372&r2=531373
==============================================================================
--- james/jspf/branches/asynch-jspf/src/test/java/org/apache/james/jspf/AbstractYamlTest.java
(original)
+++ james/jspf/branches/asynch-jspf/src/test/java/org/apache/james/jspf/AbstractYamlTest.java
Mon Apr 23 01:23:34 2007
@@ -22,6 +22,7 @@
 import org.apache.james.jspf.core.DNSService;
 import org.apache.james.jspf.core.IResponseQueue;
 import org.apache.james.jspf.core.Logger;
+import org.apache.james.jspf.core.IResponseImpl;
 import org.apache.james.jspf.core.SPFExecutor;
 import org.apache.james.jspf.core.SPFRecordParser;
 import org.apache.james.jspf.core.StagedMultipleSPFExecutor;
@@ -341,9 +342,9 @@
         public void getRecordsAsynch(String hostname, int recordType, Object id,
                 IResponseQueue responsePool) {
             try {
-                responsePool.insertResponse(new ResponseImpl(id, getRecords(hostname, recordType)));
+                responsePool.insertResponse(new IResponseImpl(id, getRecords(hostname, recordType)));
             } catch (TimeoutException e) {
-                responsePool.insertResponse(new ResponseImpl(id, e));
+                responsePool.insertResponse(new IResponseImpl(id, e));
             }
         }
     }



---------------------------------------------------------------------
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