1 36 package org.columba.ristretto.pop3; 37 38 import org.columba.ristretto.io.Source; 39 40 46 public class POP3Response { 47 48 51 public static final int OK = 0; 52 55 public static final int ERR = -1; 56 57 private int type; 58 private String message; 59 private Source data; 60 private CharSequence source; 61 62 67 public POP3Response(CharSequence source) { 68 this.source = source; 69 }; 70 71 72 73 76 public Source getData() { 77 return data; 78 } 79 80 85 public void setData(Source data) { 86 this.data = data; 87 } 88 89 92 public String getMessage() { 93 return message; 94 } 95 96 101 public void setMessage(String message) { 102 this.message = message; 103 } 104 105 108 public int getType() { 109 return type; 110 } 111 112 117 public void setType(int type) { 118 this.type = type; 119 } 120 121 124 public boolean isOK() { 125 return type == OK; 126 } 127 128 131 public boolean isERR() { 132 return type == ERR; 133 } 134 135 138 public CharSequence getSource() { 139 return source; 140 } 141 142 147 public void setSource(CharSequence source) { 148 this.source = source; 149 } 150 151 } 152 | Popular Tags |