1 2 package transport; 3 6 public class PacketTransportCommand 7 { 8 public static final PacketTransportCommand QUERY_STATS = new PacketTransportCommand("QUERY_STATS", 1); 9 public static final PacketTransportCommand TERMINATE = new PacketTransportCommand("TERMINATE", 2); 10 public static final PacketTransportCommand QUERY_CONFIG = new PacketTransportCommand("QUERY_CONFIG", 3); 11 12 private String name; 13 private int code; 14 private PacketTransportCommand(String nm, int cd) 15 { 16 super(); 17 name = nm; 18 code = cd; 19 } 20 public String getName() 21 { 22 return name; 23 } 24 public int getCode() 25 { 26 return code; 27 } 28 public String toString() 29 { 30 return getName(); 31 } 32 } 33 | Popular Tags |