You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2004/12/01 11:18:36 UTC

svn commit: r109319 - /incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/DiscardProtocolProvider.java /incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/EchoProtocolProvider.java

Author: trustin
Date: Wed Dec  1 02:18:34 2004
New Revision: 109319

URL: http://svn.apache.org/viewcvs?view=rev&rev=109319
Log:
Fixed: Encoder/DecoderFactory of DiscardProtocolProvider and EchoProtocolProvider does not create new encoders and decoders
Modified:
   incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/DiscardProtocolProvider.java
   incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/EchoProtocolProvider.java

Modified: incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/DiscardProtocolProvider.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/DiscardProtocolProvider.java?view=diff&rev=109319&p1=incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/DiscardProtocolProvider.java&r1=109318&p2=incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/DiscardProtocolProvider.java&r2=109319
==============================================================================
--- incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/DiscardProtocolProvider.java	(original)
+++ incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/DiscardProtocolProvider.java	Wed Dec  1 02:18:34 2004
@@ -35,12 +35,6 @@
 public class DiscardProtocolProvider implements ProtocolProvider,
                                                 DecoderFactory, EncoderFactory
 {
-    /** a null do nothing decoder that swallows all input */
-    public static final StatefulDecoder NULL_DECODER = new NullDecoder();
-
-    /** a null do nothing encoder that swallows all input */
-    public static final StatefulEncoder NULL_ENCODER = new NullEncoder();
-
     // ------------------------------------------------------------------------
     // ProtocolProvider Methods
     // ------------------------------------------------------------------------
@@ -74,11 +68,11 @@
     // ------------------------------------------------------------------------
     public StatefulDecoder createDecoder()
     {
-        return NULL_DECODER;
+        return new NullDecoder();
     }
 
     public StatefulEncoder createEncoder()
     {
-        return NULL_ENCODER;
+        return new NullEncoder();
     }
 }

Modified: incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/EchoProtocolProvider.java
Url: http://svn.apache.org/viewcvs/incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/EchoProtocolProvider.java?view=diff&rev=109319&p1=incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/EchoProtocolProvider.java&r1=109318&p2=incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/EchoProtocolProvider.java&r2=109319
==============================================================================
--- incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/EchoProtocolProvider.java	(original)
+++ incubator/directory/seda/trunk/src/examples/org/apache/seda/examples/EchoProtocolProvider.java	Wed Dec  1 02:18:34 2004
@@ -36,14 +36,6 @@
     /** the authoritative service name of this internet protocol: 'echo' */
     public static final String NAME = "echo";
 
-    /** a null decoder that triggers a callback returning the substrate as is */
-    public static final StatefulDecoder PASSTHRU_DECODER =
-        new PassThruDecoder();
-
-    /** a null encoder that triggers a callback returning the substrate as is */
-    public static final StatefulEncoder PASSTHRU_ENCODER =
-        new PassThruEncoder();
-
     /** echo handler where request is return back as a response */
     public static final SingleReplyHandler PASSTHRU_HANDLER =
         new PassThruHandler();
@@ -78,7 +70,7 @@
                  */
                 public StatefulDecoder createDecoder()
                 {
-                    return PASSTHRU_DECODER;
+                    return new PassThruDecoder();
                 }
             };
     }
@@ -102,7 +94,7 @@
                  */
                 public StatefulEncoder createEncoder()
                 {
-                    return PASSTHRU_ENCODER;
+                    return new PassThruEncoder();
                 }
             };
     }