![]() |
|
|
#include <jdwpcommand.h>
Inheritance diagram for inspectorj::jdwp::JDWPCommand:
Definition at line 42 of file jdwpcommand.h.
Public Member Functions | |
JDWPCommand (jdwpCmdPacket &) | |
Constructor that wraps a jdwpCmdPacket. | |
~JDWPCommand () | |
Destructor. | |
JDWPCommand * | copy () |
Copy function that produces a deep copy of this . | |
jint | getId () |
Returns the packet's id. | |
jbyte | getCmd () |
Returns the packet's command. | |
jbyte | getCmdSet () |
Returns the packet's command set. | |
jbyte | getPacketType () |
Returns the jdwp packet's flags byte. | |
Static Public Member Functions | |
static JDWPCommand * | newCommand (virtualMachineCmd) |
Constructor for virtual machine commands. | |
static JDWPCommand * | newCommand (inspectorjCmd) |
Constructor for inspectorj commands. | |
static JDWPCommand * | newCommand (referenceTypeCmd) |
Constructor for reference type commands. | |
static JDWPCommand * | newCommand (byteCodeCmd) |
Constructor for reference type commands. | |
static JDWPCommand * | newCommand (classTypeCmd) |
Constructor for class type commands. | |
static JDWPCommand * | newCommand (arrayTypeCmd) |
Constructor for array type commands. | |
static JDWPCommand * | newCommand (methodCmd) |
Constructor for method commands. | |
static JDWPCommand * | newCommand (objectReferenceCmd) |
Constructor for object reference commands. | |
static JDWPCommand * | newCommand (stringReferenceCmd) |
Constructor for string reference commands. | |
static JDWPCommand * | newCommand (threadReferenceCmd) |
Constructor for thread reference commands. | |
static JDWPCommand * | newCommand (threadGroupReferenceCmd) |
Constructor for thread group reference commands. | |
static JDWPCommand * | newCommand (arrayReferenceCmd) |
Constructor for array reference commands. | |
static JDWPCommand * | newCommand (classLoaderReferenceCmd) |
Constructor for class loader reference commands. | |
static JDWPCommand * | newCommand (eventRequestCmd) |
Constructor for event request commands. | |
static JDWPCommand * | newCommand (stackFrameCmd) |
Constructor for stack frame commands. | |
static JDWPCommand * | newCommand (classObjectReferenceCmd) |
Constructor for class object reference commands. | |
static JDWPCommand * | newCommand (eventCmd) |
Constructor for event commands. | |
Private Member Functions | |
JDWPCommand (jbyte cmdSet, jbyte cmd) | |
Private constructor. | |
int | getNextId () |
Returns the next id by incrementing the static field nextId. | |
Private Attributes | |
jdwpCmdPacket | cmdPacket |
The command packet struct. | |
Static Private Attributes | |
static int | nextId |
The static id. |
JDWPCommand::JDWPCommand | ( | jdwpCmdPacket & | packet | ) |
Constructor that wraps a jdwpCmdPacket.
This constructor is intended to be used when a command packet is received from the profiler server and we don't yet know what its data payload is. In such a case we would read the data from the socket and store it in a jdwpCmdPacket and pass it to this ctor.
Definition at line 41 of file jdwpcommand.cpp.
References inspectorj::jdwp::JDWPPacket::bytes, cmdPacket, inspectorj::jdwp::JDWPPacket::data, and inspectorj::jdwp::JDWP_HEADER_LENGTH.
Referenced by copy(), and newCommand().
JDWPCommand::~JDWPCommand | ( | ) |
JDWPCommand::JDWPCommand | ( | jbyte | cmdSet, | |
jbyte | cmd | |||
) | [private] |
Private constructor.
This constructor is used internally.
cmdSet | The cmdSet byte for this command | |
cmd | The cmd within the command set |
Definition at line 87 of file jdwpcommand.cpp.
References inspectorj::jdwp::JDWPPacket::bytes, cmdPacket, inspectorj::jdwp::JDWPPacket::data, and getNextId().
JDWPCommand * JDWPCommand::copy | ( | ) | [virtual] |
Copy function that produces a deep copy of this
.
This function re-implements JDWPPacket::copy(). This is necessary since the base class, JDWPPacket, has pure virtual functions and therefore cannot provide a copy constructor.
Implements inspectorj::jdwp::JDWPPacket.
Definition at line 64 of file jdwpcommand.cpp.
References cmdPacket, and JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | virtualMachineCmd | cmd | ) | [static] |
Constructor for virtual machine commands.
cmd | A cmd from the virtual machine command set |
Definition at line 128 of file jdwpcommand.cpp.
References JDWPCommand().
Referenced by inspectorj::toolset::ClassToolSet::disassembleBytecodes(), inspectorj::toolset::ClassToolSet::getAllLoadedClasses(), and inspectorj::toolset::ClassToolSet::getClassDetails().
JDWPCommand * JDWPCommand::newCommand | ( | inspectorjCmd | cmd | ) | [static] |
Constructor for inspectorj commands.
cmd | A cmd from the inspectorj command set |
Definition at line 138 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | referenceTypeCmd | cmd | ) | [static] |
Constructor for reference type commands.
cmd | A cmd from the reference type command set |
Definition at line 108 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | byteCodeCmd | cmd | ) | [static] |
Constructor for reference type commands.
cmd | A cmd from the reference type command set |
Definition at line 118 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | classTypeCmd | cmd | ) | [static] |
Constructor for class type commands.
cmd | A cmd from the class type command set |
Definition at line 148 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | arrayTypeCmd | cmd | ) | [static] |
Constructor for array type commands.
cmd | A cmd from the array type command set |
Definition at line 158 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | methodCmd | cmd | ) | [static] |
Constructor for method commands.
cmd | A cmd from the method command set |
Definition at line 168 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | objectReferenceCmd | cmd | ) | [static] |
Constructor for object reference commands.
cmd | A cmd from the object reference command set |
Definition at line 178 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | stringReferenceCmd | cmd | ) | [static] |
Constructor for string reference commands.
cmd | A cmd from the string reference command set |
Definition at line 188 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | threadReferenceCmd | cmd | ) | [static] |
Constructor for thread reference commands.
cmd | A cmd from the thread reference command set |
Definition at line 198 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | threadGroupReferenceCmd | cmd | ) | [static] |
Constructor for thread group reference commands.
cmd | A cmd from the thread group reference command set |
Definition at line 208 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | arrayReferenceCmd | cmd | ) | [static] |
Constructor for array reference commands.
cmd | A cmd from the array reference command set |
Definition at line 218 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | classLoaderReferenceCmd | cmd | ) | [static] |
Constructor for class loader reference commands.
cmd | A cmd from the class loader reference command set |
Definition at line 228 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | eventRequestCmd | cmd | ) | [static] |
Constructor for event request commands.
cmd | A cmd from the event request command set |
Definition at line 238 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | stackFrameCmd | cmd | ) | [static] |
Constructor for stack frame commands.
cmd | A cmd from the stack frame command set |
Definition at line 248 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | classObjectReferenceCmd | cmd | ) | [static] |
Constructor for class object reference commands.
cmd | A cmd from the class object reference command set |
Definition at line 258 of file jdwpcommand.cpp.
References JDWPCommand().
JDWPCommand * JDWPCommand::newCommand | ( | eventCmd | cmd | ) | [static] |
Constructor for event commands.
cmd | A cmd from the event command set |
Definition at line 268 of file jdwpcommand.cpp.
References JDWPCommand().
jint JDWPCommand::getId | ( | ) | [virtual] |
Returns the packet's id.
Implements inspectorj::jdwp::JDWPPacket.
Definition at line 301 of file jdwpcommand.cpp.
References cmdPacket.
Referenced by inspectorj::agent::commandset::JDWPCommandSet::getJDWPReply(), inspectorj::agent::AgentPacketHandler::processCommand(), and inspectorj::client::ClientPacketHandler::sendJDWPCommand().
jbyte JDWPCommand::getCmd | ( | ) |
Returns the packet's command.
Definition at line 285 of file jdwpcommand.cpp.
References cmdPacket.
Referenced by inspectorj::agent::commandset::VirtualMachineCmdSet::process(), inspectorj::agent::commandset::ReferenceTypeCmdSet::process(), inspectorj::agent::commandset::BytecodeCmdSet::process(), and inspectorj::client::ClientPacketHandler::sendJDWPCommand().
jbyte JDWPCommand::getCmdSet | ( | ) |
Returns the packet's command set.
Definition at line 293 of file jdwpcommand.cpp.
References cmdPacket.
Referenced by inspectorj::agent::AgentPacketHandler::processCommand(), and inspectorj::client::ClientPacketHandler::sendJDWPCommand().
jbyte JDWPCommand::getPacketType | ( | ) | [virtual] |
Returns the jdwp packet's flags byte.
This identifies the packet as a command packet or a reply packet.
Implements inspectorj::jdwp::JDWPPacket.
Definition at line 277 of file jdwpcommand.cpp.
References cmdPacket.
Referenced by inspectorj::client::ClientPacketHandler::sendJDWPCommand().
int JDWPCommand::getNextId | ( | ) | [private] |
Returns the next id by incrementing the static field nextId.
This should only be called from the private constructor.
Definition at line 310 of file jdwpcommand.cpp.
References nextId.
Referenced by JDWPCommand().
jdwpCmdPacket inspectorj::jdwp::JDWPCommand::cmdPacket [private] |
The command packet struct.
Definition at line 77 of file jdwpcommand.h.
Referenced by copy(), getCmd(), getCmdSet(), getId(), getPacketType(), JDWPCommand(), and ~JDWPCommand().
int JDWPCommand::nextId [static, private] |