directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r327944 - in /directory/protocol-providers/dns/trunk/src/java/org/apache/dns: protocol/ service/ store/ store/operations/
Date Mon, 24 Oct 2005 03:33:10 GMT
Author: erodriguez
Date: Sun Oct 23 20:33:05 2005
New Revision: 327944

URL: http://svn.apache.org/viewcvs?rev=327944&view=rev
Log:
Refactoring classes commonly used by protocol-providers to new protocol-common subproject.

Modified:
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/protocol/DnsProtocolHandler.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/BuildReply.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsContext.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsExceptionHandler.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DomainNameServiceChain.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/GetResourceRecords.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorContext.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorMessage.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorReply.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorRequest.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/JndiRecordStoreImpl.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/RecordStore.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/operations/GetRecord.java

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/protocol/DnsProtocolHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/protocol/DnsProtocolHandler.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/protocol/DnsProtocolHandler.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/protocol/DnsProtocolHandler.java
Sun Oct 23 20:33:05 2005
@@ -17,7 +17,6 @@
 
 package org.apache.dns.protocol;
 
-import org.apache.dns.chain.Command;
 import org.apache.dns.messages.DnsMessage;
 import org.apache.dns.service.DnsConfiguration;
 import org.apache.dns.service.DnsContext;
@@ -26,6 +25,7 @@
 import org.apache.mina.common.IdleStatus;
 import org.apache.mina.protocol.ProtocolHandler;
 import org.apache.mina.protocol.ProtocolSession;
+import org.apache.protocol.common.chain.Command;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/BuildReply.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/BuildReply.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/BuildReply.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/BuildReply.java
Sun Oct 23 20:33:05 2005
@@ -16,14 +16,14 @@
  */
 package org.apache.dns.service;
 
-import org.apache.dns.chain.Context;
-import org.apache.dns.chain.impl.CommandBase;
 import org.apache.dns.messages.DnsMessage;
 import org.apache.dns.messages.DnsMessageModifier;
 import org.apache.dns.messages.MessageType;
 import org.apache.dns.messages.OpCode;
 import org.apache.dns.messages.ResourceRecords;
 import org.apache.dns.messages.ResponseCode;
+import org.apache.protocol.common.chain.Context;
+import org.apache.protocol.common.chain.impl.CommandBase;
 
 public class BuildReply extends CommandBase
 {

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsContext.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsContext.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsContext.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsContext.java
Sun Oct 23 20:33:05 2005
@@ -16,11 +16,11 @@
  */
 package org.apache.dns.service;
 
-import org.apache.dns.chain.impl.ContextBase;
 import org.apache.dns.messages.DnsMessage;
 import org.apache.dns.messages.ResourceRecord;
 import org.apache.dns.messages.ResourceRecords;
 import org.apache.dns.store.RecordStore;
+import org.apache.protocol.common.chain.impl.ContextBase;
 
 public class DnsContext extends ContextBase
 {

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsExceptionHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsExceptionHandler.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsExceptionHandler.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DnsExceptionHandler.java
Sun Oct 23 20:33:05 2005
@@ -17,15 +17,15 @@
 package org.apache.dns.service;
 
 import org.apache.dns.DnsException;
-import org.apache.dns.chain.Context;
-import org.apache.dns.chain.Filter;
-import org.apache.dns.chain.impl.CommandBase;
 import org.apache.dns.messages.DnsMessage;
 import org.apache.dns.messages.DnsMessageModifier;
 import org.apache.dns.messages.MessageType;
 import org.apache.dns.messages.OpCode;
 import org.apache.dns.messages.ResourceRecords;
 import org.apache.dns.messages.ResponseCode;
+import org.apache.protocol.common.chain.Context;
+import org.apache.protocol.common.chain.Filter;
+import org.apache.protocol.common.chain.impl.CommandBase;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DomainNameServiceChain.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DomainNameServiceChain.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DomainNameServiceChain.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/DomainNameServiceChain.java
Sun Oct 23 20:33:05 2005
@@ -16,7 +16,7 @@
  */
 package org.apache.dns.service;
 
-import org.apache.dns.chain.impl.ChainBase;
+import org.apache.protocol.common.chain.impl.ChainBase;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/GetResourceRecords.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/GetResourceRecords.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/GetResourceRecords.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/GetResourceRecords.java
Sun Oct 23 20:33:05 2005
@@ -19,14 +19,13 @@
 import java.util.Iterator;
 
 import org.apache.dns.DnsException;
-import org.apache.dns.chain.Context;
-import org.apache.dns.chain.impl.CommandBase;
 import org.apache.dns.messages.QuestionRecord;
 import org.apache.dns.messages.QuestionRecords;
 import org.apache.dns.messages.ResourceRecord;
 import org.apache.dns.messages.ResponseCode;
 import org.apache.dns.store.RecordStore;
-import org.apache.dns.store.operations.GetRecord;
+import org.apache.protocol.common.chain.Context;
+import org.apache.protocol.common.chain.impl.CommandBase;
 
 public class GetResourceRecords extends CommandBase
 {
@@ -53,7 +52,7 @@
 
         try
         {
-            record = (ResourceRecord) store.execute( new GetRecord( question ) );
+            record = store.getRecord( question );
         }
         catch ( Exception e )
         {

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorContext.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorContext.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorContext.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorContext.java
Sun Oct 23 20:33:05 2005
@@ -16,10 +16,10 @@
  */
 package org.apache.dns.service;
 
-import org.apache.dns.chain.Context;
-import org.apache.dns.chain.impl.CommandBase;
 import org.apache.dns.messages.ResourceRecords;
 import org.apache.dns.store.RecordStore;
+import org.apache.protocol.common.chain.Context;
+import org.apache.protocol.common.chain.impl.CommandBase;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorMessage.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorMessage.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorMessage.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorMessage.java
Sun Oct 23 20:33:05 2005
@@ -16,12 +16,12 @@
  */
 package org.apache.dns.service;
 
-import org.apache.dns.chain.impl.CommandBase;
 import org.apache.dns.messages.DnsMessage;
 import org.apache.dns.messages.MessageType;
 import org.apache.dns.messages.OpCode;
 import org.apache.dns.messages.QuestionRecords;
 import org.apache.dns.messages.ResponseCode;
+import org.apache.protocol.common.chain.impl.CommandBase;
 
 public abstract class MonitorMessage extends CommandBase
 {

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorReply.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorReply.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorReply.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorReply.java
Sun Oct 23 20:33:05 2005
@@ -16,7 +16,7 @@
  */
 package org.apache.dns.service;
 
-import org.apache.dns.chain.Context;
+import org.apache.protocol.common.chain.Context;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorRequest.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorRequest.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorRequest.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/service/MonitorRequest.java
Sun Oct 23 20:33:05 2005
@@ -16,7 +16,7 @@
  */
 package org.apache.dns.service;
 
-import org.apache.dns.chain.Context;
+import org.apache.protocol.common.chain.Context;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/JndiRecordStoreImpl.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/JndiRecordStoreImpl.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/JndiRecordStoreImpl.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/JndiRecordStoreImpl.java
Sun Oct 23 20:33:05 2005
@@ -19,10 +19,14 @@
 import javax.naming.Name;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.dns.messages.QuestionRecord;
+import org.apache.dns.messages.ResourceRecord;
+import org.apache.dns.store.operations.GetRecord;
+import org.apache.protocol.common.store.ContextOperation;
+
 /**
- * A simple implementation of the RecordStore interface using a JNDI
- * based store.
- *
+ * A simple implementation of the RecordStore interface using a JNDI-based store.
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
@@ -48,7 +52,12 @@
         this.searchBase = searchBase;
     }
 
-    public Object execute( ContextOperation operation ) throws Exception
+    public ResourceRecord getRecord( QuestionRecord question ) throws Exception
+    {
+        return (ResourceRecord) execute( new GetRecord( question ) );
+    }
+
+    private Object execute( ContextOperation operation ) throws Exception
     {
         return operation.execute( ctx, searchBase );
     }

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/RecordStore.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/RecordStore.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/RecordStore.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/RecordStore.java
Sun Oct 23 20:33:05 2005
@@ -16,20 +16,14 @@
  */
 package org.apache.dns.store;
 
+import org.apache.dns.messages.QuestionRecord;
+import org.apache.dns.messages.ResourceRecord;
+
 /**
- * Interface to support the command pattern with the record store.
- *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
 public interface RecordStore
 {
-    /**
-     * The command pattern execute method.
-     * 
-     * @param operation The operation to execute
-     * @return Object The result returned by the operation
-     * @throws Exception The exception thrown by the operation
-     */
-    public Object execute( ContextOperation operation ) throws Exception;
+    public ResourceRecord getRecord( QuestionRecord question ) throws Exception;
 }

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/operations/GetRecord.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/operations/GetRecord.java?rev=327944&r1=327943&r2=327944&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/operations/GetRecord.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/store/operations/GetRecord.java
Sun Oct 23 20:33:05 2005
@@ -31,8 +31,8 @@
 import org.apache.dns.messages.RecordType;
 import org.apache.dns.messages.ResourceRecord;
 import org.apache.dns.messages.ResourceRecordModifier;
-import org.apache.dns.store.ContextOperation;
 import org.apache.dns.store.DnsAttribute;
+import org.apache.protocol.common.store.ContextOperation;
 
 /**
  * Encapsulates the action of looking up a Resource Record from an embedded JNDI provider.



Mime
View raw message