1 16 package org.apache.commons.net; 17 import java.util.EventObject ; 18 19 33 34 public class ProtocolCommandEvent extends EventObject 35 { 36 private int __replyCode; 37 private boolean __isCommand; 38 private String __message, __command; 39 40 52 public ProtocolCommandEvent(Object source, String command, String message) 53 { 54 super(source); 55 __replyCode = 0; 56 __message = message; 57 __isCommand = true; 58 __command = command; 59 } 60 61 62 76 public ProtocolCommandEvent(Object source, int replyCode, String message) 77 { 78 super(source); 79 __replyCode = replyCode; 80 __message = message; 81 __isCommand = false; 82 __command = null; 83 } 84 85 93 public String getCommand() 94 { 95 return __command; 96 } 97 98 99 106 public int getReplyCode() 107 { 108 return __replyCode; 109 } 110 111 118 public boolean isCommand() 119 { 120 return __isCommand; 121 } 122 123 130 public boolean isReply() 131 { 132 return !isCommand(); 133 } 134 135 140 public String getMessage() 141 { 142 return __message; 143 } 144 } 145 | Popular Tags |