67 |
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command) |
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command) |
68 |
throws JdwpException |
throws JdwpException |
69 |
{ |
{ |
70 |
boolean keepRunning = true; |
boolean shutdown = false; |
71 |
try |
try |
72 |
{ |
{ |
73 |
switch (command) |
switch (command) |
91 |
executeIDsizes(bb, os); |
executeIDsizes(bb, os); |
92 |
break; |
break; |
93 |
case JdwpConstants.CommandSet.VirtualMachine.DISPOSE: |
case JdwpConstants.CommandSet.VirtualMachine.DISPOSE: |
94 |
keepRunning = false; |
shutdown = true; |
95 |
executeDispose(bb, os); |
executeDispose(bb, os); |
96 |
break; |
break; |
97 |
case JdwpConstants.CommandSet.VirtualMachine.SUSPEND: |
case JdwpConstants.CommandSet.VirtualMachine.SUSPEND: |
101 |
executeResume(bb, os); |
executeResume(bb, os); |
102 |
break; |
break; |
103 |
case JdwpConstants.CommandSet.VirtualMachine.EXIT: |
case JdwpConstants.CommandSet.VirtualMachine.EXIT: |
104 |
keepRunning = false; |
shutdown = true; |
105 |
executeExit(bb, os); |
executeExit(bb, os); |
106 |
break; |
break; |
107 |
case JdwpConstants.CommandSet.VirtualMachine.CREATE_STRING: |
case JdwpConstants.CommandSet.VirtualMachine.CREATE_STRING: |
145 |
// So if we throw an IOException we're in serious trouble |
// So if we throw an IOException we're in serious trouble |
146 |
throw new JdwpInternalErrorException(ex); |
throw new JdwpInternalErrorException(ex); |
147 |
} |
} |
148 |
return keepRunning; |
|
149 |
|
return shutdown; |
150 |
} |
} |
151 |
|
|
152 |
private void executeVersion(ByteBuffer bb, DataOutputStream os) |
private void executeVersion(ByteBuffer bb, DataOutputStream os) |
165 |
String vmVersion = props.getProperty("java.version"); |
String vmVersion = props.getProperty("java.version"); |
166 |
String vmName = props.getProperty("java.vm.name"); |
String vmName = props.getProperty("java.vm.name"); |
167 |
JdwpString.writeString(os, description); |
JdwpString.writeString(os, description); |
168 |
os.write(jdwpMajor); |
os.writeInt(jdwpMajor); |
169 |
os.write(jdwpMinor); |
os.writeInt(jdwpMinor); |
170 |
JdwpString.writeString(os, vmName); |
JdwpString.writeString(os, vmName); |
171 |
JdwpString.writeString(os, vmVersion); |
JdwpString.writeString(os, vmVersion); |
172 |
} |
} |