1 16 package org.apache.commons.net.smtp; 17 18 29 30 public final class SMTPReply 31 { 32 33 public static final int CODE_211 = 211; 34 public static final int CODE_214 = 214; 35 public static final int CODE_215 = 215; 36 public static final int CODE_220 = 220; 37 public static final int CODE_221 = 221; 38 public static final int CODE_250 = 250; 39 public static final int CODE_251 = 251; 40 public static final int CODE_354 = 354; 41 public static final int CODE_421 = 421; 42 public static final int CODE_450 = 450; 43 public static final int CODE_451 = 451; 44 public static final int CODE_452 = 452; 45 public static final int CODE_500 = 500; 46 public static final int CODE_501 = 501; 47 public static final int CODE_502 = 502; 48 public static final int CODE_503 = 503; 49 public static final int CODE_504 = 504; 50 public static final int CODE_550 = 550; 51 public static final int CODE_551 = 551; 52 public static final int CODE_552 = 552; 53 public static final int CODE_553 = 553; 54 public static final int CODE_554 = 554; 55 56 public static final int SYSTEM_STATUS = CODE_211; 57 public static final int HELP_MESSAGE = CODE_214; 58 public static final int SERVICE_READY = CODE_220; 59 public static final int SERVICE_CLOSING_TRANSMISSION_CHANNEL = CODE_221; 60 public static final int ACTION_OK = CODE_250; 61 public static final int USER_NOT_LOCAL_WILL_FORWARD = CODE_251; 62 public static final int START_MAIL_INPUT = CODE_354; 63 public static final int SERVICE_NOT_AVAILABLE = CODE_421; 64 public static final int ACTION_NOT_TAKEN = CODE_450; 65 public static final int ACTION_ABORTED = CODE_451; 66 public static final int INSUFFICIENT_STORAGE = CODE_452; 67 public static final int UNRECOGNIZED_COMMAND = CODE_500; 68 public static final int SYNTAX_ERROR_IN_ARGUMENTS = CODE_501; 69 public static final int COMMAND_NOT_IMPLEMENTED = CODE_502; 70 public static final int BAD_COMMAND_SEQUENCE = CODE_503; 71 public static final int COMMAND_NOT_IMPLEMENTED_FOR_PARAMETER = CODE_504; 72 public static final int MAILBOX_UNAVAILABLE = CODE_550; 73 public static final int USER_NOT_LOCAL = CODE_551; 74 public static final int STORAGE_ALLOCATION_EXCEEDED = CODE_552; 75 public static final int MAILBOX_NAME_NOT_ALLOWED = CODE_553; 76 public static final int TRANSACTION_FAILED = CODE_554; 77 78 private SMTPReply() 80 {} 81 82 97 public static boolean isPositivePreliminary(int reply) 98 { 99 return (reply >= 100 && reply < 200); 100 } 101 102 112 public static boolean isPositiveCompletion(int reply) 113 { 114 return (reply >= 200 && reply < 300); 115 } 116 117 130 public static boolean isPositiveIntermediate(int reply) 131 { 132 return (reply >= 300 && reply < 400); 133 } 134 135 145 public static boolean isNegativeTransient(int reply) 146 { 147 return (reply >= 400 && reply < 500); 148 } 149 150 160 public static boolean isNegativePermanent(int reply) 161 { 162 return (reply >= 500 && reply < 600); 163 } 164 165 } 166 | Popular Tags |