You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2011/11/21 11:01:08 UTC

svn commit: r1204425 - /james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Response.java

Author: norman
Date: Mon Nov 21 10:01:08 2011
New Revision: 1204425

URL: http://svn.apache.org/viewvc?rev=1204425&view=rev
Log:
Provide static instances of +OK and -ERR responses

Modified:
    james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Response.java

Modified: james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Response.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Response.java?rev=1204425&r1=1204424&r2=1204425&view=diff
==============================================================================
--- james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Response.java (original)
+++ james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Response.java Mon Nov 21 10:01:08 2011
@@ -29,7 +29,6 @@ import org.apache.james.protocols.api.Ab
  */
 public class POP3Response extends AbstractResponse {
 
-    // POP3 response prefixes
     /** OK response. Requested content will follow */
     public final static String OK_RESPONSE = "+OK";
 
@@ -41,19 +40,35 @@ public class POP3Response extends Abstra
 
     public final static String WS = " ";
     
+    
+    /**
+     * {@link #OK_RESPONSE} with no description
+     */
+    public static final POP3Response OK = new POP3Response(OK_RESPONSE);
+    
     /**
-     * Construct a new POP3Response. The given code and description can not be
-     * null, if null an IllegalArgumentException get thrown
+     * {@link #ERR_RESPONSE} with no description
+     */
+    public static final POP3Response ERR = new POP3Response(ERR_RESPONSE);
+
+    
+    /**
+     * Construct a new POP3Response. The given code can not be
+     * </code>null</code>, if <code>null</code> an {@link IllegalArgumentException} get thrown
      * 
      * @param code
      *            the returnCode
      * @param description
-     *            the description
+     *            the description or <code>null</code> if no description should be used
      */
     public POP3Response(String code, CharSequence description) {
         super(code, description);
     }
 
+    /**
+     * {@link #POP3Response(String, CharSequence)}
+     * 
+     */
     public POP3Response(String code) {
         this(code, null);
     }



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