![]() |
|
|
00001 /*************************************************************************** 00002 * inspectorJ - java profiler * 00003 * Copyright (C) 2007 by James May 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 00027 #ifndef JDWPCOMMAND_H 00028 #define JDWPCOMMAND_H 00029 00030 #include "inspectorj/jdwp/jdwppacket.h" 00031 00032 namespace inspectorj { 00033 namespace jdwp { 00034 00042 class JDWPCommand : public JDWPPacket { 00043 public: 00044 JDWPCommand(jdwpCmdPacket&); 00045 ~JDWPCommand(); 00046 JDWPCommand* copy(); 00047 00048 // Command Constructors. Each represents a jdwp command set 00049 static JDWPCommand* newCommand(virtualMachineCmd); 00050 static JDWPCommand* newCommand(inspectorjCmd); 00051 static JDWPCommand* newCommand(referenceTypeCmd); 00052 static JDWPCommand* newCommand(byteCodeCmd); 00053 static JDWPCommand* newCommand(classTypeCmd); 00054 static JDWPCommand* newCommand(arrayTypeCmd); 00055 static JDWPCommand* newCommand(methodCmd); 00056 static JDWPCommand* newCommand(objectReferenceCmd); 00057 static JDWPCommand* newCommand(stringReferenceCmd); 00058 static JDWPCommand* newCommand(threadReferenceCmd); 00059 static JDWPCommand* newCommand(threadGroupReferenceCmd); 00060 static JDWPCommand* newCommand(arrayReferenceCmd); 00061 static JDWPCommand* newCommand(classLoaderReferenceCmd); 00062 static JDWPCommand* newCommand(eventRequestCmd); 00063 static JDWPCommand* newCommand(stackFrameCmd); 00064 static JDWPCommand* newCommand(classObjectReferenceCmd); 00065 static JDWPCommand* newCommand(eventCmd); 00066 00067 jint getId(); 00068 jbyte getCmd(); 00069 jbyte getCmdSet(); 00070 jbyte getPacketType(); 00071 00072 private: 00074 JDWPCommand(jbyte cmdSet, jbyte cmd); 00075 00077 jdwpCmdPacket cmdPacket; 00078 00080 static int nextId; 00081 int getNextId(); 00082 00083 }; 00084 00085 } // end namespace jdwp 00086 } // end namespace inspectorj 00087 00088 #endif // JDWPCOMMAND_H 00089 00090