ij-16.png   inspectorJ -- JavaTM Profiler
sf project site browse source checkout source
SourceForge.net Logo



src/inspectorj/agent/commandset/jdwpcommandset.h

Go to the documentation of this file.
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 INSPECTORJ_AGENT_COMMANDSET_JDWPCOMMANDSET_H
00028 #define INSPECTORJ_AGENT_COMMANDSET_JDWPCOMMANDSET_H
00029 
00030 #include <boost/bind.hpp>
00031 #include <boost/function.hpp>
00032 #include <QMap>
00033 #include "inspectorj/agent/agentutils.h"
00034 #include "inspectorj/jdwp/jdwpcommand.h"
00035 #include "inspectorj/jdwp/jdwpreply.h"
00036                         
00037 namespace inspectorj {
00038 namespace agent {
00039 namespace commandset {
00040 
00041 using inspectorj::jdwp::JDWPCommand;
00042 using inspectorj::jdwp::JDWPReply;
00043     
00051 class JDWPCommandSet{    
00052     public:
00053         virtual ~JDWPCommandSet();
00054         virtual void process(JDWPCommand*, boost::function<void (JDWPReply*)> cbk) = 0;
00055         static QMap<qint64, jclass>& getClassMap();
00056         
00057     protected:
00058         JavaVM *vm;
00059         jvmtiEnv *jvmti;
00060         JNIEnv *env;
00061         virtual JDWPReply* getJDWPReply(JDWPCommand* cmd);
00062         virtual void sendNotImplementedReply(JDWPCommand* cmd, boost::function< void (JDWPReply*) > cbk);
00063         boost::function<void (JDWPReply*)> cbk;
00064         
00065     private:
00066         static QMap<qint64, jclass> classMap;
00067 };
00068 
00069 } // end namespace commandset
00070 } // end namespace agent
00071 } // end namespace inspectorj
00072 
00073 #endif // INSPECTORJ_AGENT_COMMANDSET_JDWPCOMMANDSET_H

Generated on Sun Aug 19 17:07:53 2007 for inspectorJ by  doxygen 1.5.1