KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > transport > PacketTransportCommand


1
2 package transport;
3 /**
4  *
5  */

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 JavaDoc name;
13     private int code;
14     private PacketTransportCommand(String JavaDoc nm, int cd)
15     {
16         super();
17         name = nm;
18         code = cd;
19     }
20     public String JavaDoc getName()
21     {
22         return name;
23     }
24     public int getCode()
25     {
26         return code;
27     }
28     public String JavaDoc toString()
29     {
30         return getName();
31     }
32 }
33
Popular Tags