inspectorJ -- JavaTM Profiler
|
|
|
#include <agentpackethandler.h>
Collaboration diagram for inspectorj::agent::AgentPacketHandler:

Commands are dispatched to the appropriate JDWPCommandSet for processing.
Definition at line 51 of file agentpackethandler.h.
Public Member Functions | |
| AgentPacketHandler (JavaVM *vm, JNIEnv *env, jvmtiEnv *jvmti, AgentSocket *socket=0) | |
| Constructor. | |
| ~AgentPacketHandler () | |
| Destructor. | |
| void | setAgentSocket (AgentSocket *&) |
| Sets the AgentSocket used by the handler. | |
| JDWPCommandSet * | getCommandSet (jbyte cmd) |
| Returns an appropriate JDWPCommandSet for the jdwpCmdPacket. | |
| JDWPReply * | getReply () |
| void | createCommandSets () |
| Create the command sets to be used. | |
| void | attachCurrentThreadToVM () |
| Attach the current thread to the java virtual machine. | |
| void | processCommand (JDWPCommand *cmd) |
| Process the JDWPCommand. | |
Private Member Functions | |
| void | writeReply (JDWPReply *) |
| Write a reply to the AgentSocket. | |
Private Attributes | |
| JavaVM * | vm |
| JNIEnv * | env |
| jvmtiEnv * | jvmti |
| AgentSocket * | socket |
| VirtualMachineCmdSet * | vmCmdSet |
| ReferenceTypeCmdSet * | refTypeCmdSet |
| BytecodeCmdSet * | bcCmdSet |
| inspectorj::agent::AgentPacketHandler::AgentPacketHandler | ( | JavaVM * | vm, | |
| JNIEnv * | env, | |||
| jvmtiEnv * | jvmti, | |||
| AgentSocket * | socket = 0 | |||
| ) |
Constructor.
| env | The jvmtiEnv (JVMTI Environment) ptr | |
| socket | AgentSocket |
Definition at line 40 of file agentpackethandler.cpp.
References createCommandSets().
| inspectorj::agent::AgentPacketHandler::~AgentPacketHandler | ( | ) |
| void inspectorj::agent::AgentPacketHandler::setAgentSocket | ( | AgentSocket *& | socket | ) |
Sets the AgentSocket used by the handler.
| socket | The AgentSocket |
Definition at line 118 of file agentpackethandler.cpp.
References socket.
Referenced by inspectorj::agent::AgentServer::start().
| JDWPCommandSet * inspectorj::agent::AgentPacketHandler::getCommandSet | ( | jbyte | cmd | ) |
Returns an appropriate JDWPCommandSet for the jdwpCmdPacket.
| pkt | The jdwpCmdPacket |
Definition at line 127 of file agentpackethandler.cpp.
References bcCmdSet, refTypeCmdSet, and vmCmdSet.
Referenced by processCommand().
| void inspectorj::agent::AgentPacketHandler::createCommandSets | ( | ) |
Create the command sets to be used.
Definition at line 61 of file agentpackethandler.cpp.
References bcCmdSet, env, jvmti, refTypeCmdSet, vm, and vmCmdSet.
Referenced by AgentPacketHandler().
| void inspectorj::agent::AgentPacketHandler::attachCurrentThreadToVM | ( | ) |
Attach the current thread to the java virtual machine.
Definition at line 71 of file agentpackethandler.cpp.
Referenced by inspectorj::agent::AgentServer::start().
| void inspectorj::agent::AgentPacketHandler::processCommand | ( | JDWPCommand * | cmd | ) |
Process the JDWPCommand.
| cmd | The JDWPCommand to process |
Definition at line 93 of file agentpackethandler.cpp.
References inspectorj::jdwp::ERR_NOT_IMPLEMENTED, inspectorj::jdwp::JDWPCommand::getCmdSet(), getCommandSet(), inspectorj::jdwp::JDWPCommand::getId(), inspectorj::agent::commandset::JDWPCommandSet::process(), and writeReply().
Referenced by inspectorj::agent::AgentServer::start().
| void inspectorj::agent::AgentPacketHandler::writeReply | ( | JDWPReply * | reply | ) | [private] |
Write a reply to the AgentSocket.
| reply | The JDWPReply that wraps a jdwpReplyPacket. |
Definition at line 81 of file agentpackethandler.cpp.
References socket, and inspectorj::agent::AgentSocket::writeReply().
Referenced by processCommand().
1.5.1