40 |
package gnu.classpath.jdwp.processor; |
package gnu.classpath.jdwp.processor; |
41 |
|
|
42 |
import gnu.classpath.jdwp.exception.JdwpException; |
import gnu.classpath.jdwp.exception.JdwpException; |
43 |
|
import gnu.classpath.jdwp.VMIdManager; |
44 |
|
import gnu.classpath.jdwp.VMVirtualMachine; |
45 |
|
|
46 |
import java.io.DataOutputStream; |
import java.io.DataOutputStream; |
47 |
import java.nio.ByteBuffer; |
import java.nio.ByteBuffer; |
52 |
* |
* |
53 |
* @author Aaron Luchko <aluchko@redhat.com> |
* @author Aaron Luchko <aluchko@redhat.com> |
54 |
*/ |
*/ |
55 |
public interface CommandSet |
public abstract class CommandSet |
56 |
{ |
{ |
57 |
/** |
/** |
58 |
|
* The VM's ID manager |
59 |
|
*/ |
60 |
|
protected final VMIdManager idMan = VMIdManager.getDefault (); |
61 |
|
|
62 |
|
/** |
63 |
|
* The virtual machine description |
64 |
|
*/ |
65 |
|
protected final VMVirtualMachine vm = VMVirtualMachine.getDefault (); |
66 |
|
|
67 |
|
/** |
68 |
* Runs the given command with the data in distr and writes the data for the |
* Runs the given command with the data in distr and writes the data for the |
69 |
* reply packet to ostr. |
* reply packet to ostr. |
70 |
* |
* |
74 |
* @return true if the JDWP layer should shut down in response to this packet |
* @return true if the JDWP layer should shut down in response to this packet |
75 |
* @throws JdwpException command wasn't carried out successfully |
* @throws JdwpException command wasn't carried out successfully |
76 |
*/ |
*/ |
77 |
public boolean runCommand(ByteBuffer bb, DataOutputStream os, |
public abstract boolean runCommand(ByteBuffer bb, DataOutputStream os, |
78 |
byte command) |
byte command) |
79 |
throws JdwpException; |
throws JdwpException; |
80 |
} |
} |