summaryrefslogtreecommitdiff
path: root/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2005-08-25 22:09:48 +0000
committerKeith Seitz <keiths@redhat.com>2005-08-25 22:09:48 +0000
commit22856b8f2a463df5d4fabbe7f2758f4c3069b81c (patch)
treea9e1e0bdd83a92981cfc2de8b2b2c099da10ad14 /gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
parent1464bb4c918e172a986f35721aa19c61db3cdaad (diff)
downloadclasspath-22856b8f2a463df5d4fabbe7f2758f4c3069b81c.tar.gz
* gnu/classpath/jdwp/processor/CommandSet.java (CommandSet): Make
an abstract class. Add protected variables for VMIdManager and VMVirtualMachine. (runCommand): Make abstract. * gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java (ArrayReferenceCommandSet): Derive from CommandSet instead of implementing it. Remove private hooks to ID manager and VM. Update all VMIdManager and EventManager API calls. * gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java (ArrayTypeCommandSet): Likewise. * gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java (ClassLoaderReferenceCommandSet): Likewise. * gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java (ClassObjectReferenceCommandSet): Likewise. * gnu/classpath/jdwp/processor/ClassTypeCommandSet.java (ClassTypeCommandSet): Likewise. * gnu/classpath/jdwp/processor/EventRequestCommandSet.java (EventRequestCommandSet): Likewise. * gnu/classpath/jdwp/processor/FieldCommandSet.java (FieldCommandSet): Likewise. * gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java (InterfaceTypeCommandSet): Likewise. * gnu/classpath/jdwp/processor/MethodCommandSet.java (MethodCommandSet): Likewise. * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java (ObjectReferenceCommandSet): Likewise. * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java (ReferenceTypeCommandSet): Likewise. * gnu/classpath/jdwp/processor/StackFrameCommandSet.java (StackFrameCommandSet): Likewise. * gnu/classpath/jdwp/processor/StringReferenceCommandSet.java (StringReferenceCommandSet): Likewise. * gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java (ThreadGroupReferenceCommandSet.java): Likewise. * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java (ThreadReferenceCommandSet): Likewise. * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java (VirtualMachineCommandSet): Likewise. * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java (executeStatus): Fix constant name. * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java (executeDisposeObjects): Don't do anything yet -- this is unimplemented.
Diffstat (limited to 'gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java')
-rw-r--r--gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
index 28ff860c0..8a11195a7 100644
--- a/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
+++ b/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
@@ -39,12 +39,10 @@ exception statement from your version. */
package gnu.classpath.jdwp.processor;
-import gnu.classpath.jdwp.Jdwp;
import gnu.classpath.jdwp.JdwpConstants;
import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.IdManager;
import gnu.classpath.jdwp.id.ObjectId;
import gnu.classpath.jdwp.util.JdwpString;
@@ -57,11 +55,9 @@ import java.nio.ByteBuffer;
*
* @author Aaron Luchko <aluchko@redhat.com>
*/
-public class ThreadGroupReferenceCommandSet implements CommandSet
+public class ThreadGroupReferenceCommandSet
+ extends CommandSet
{
- // Manages all the different ids that are assigned by jdwp
- private final IdManager idMan = Jdwp.getIdManager();
-
public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
throws JdwpException
{
@@ -95,7 +91,7 @@ public class ThreadGroupReferenceCommandSet implements CommandSet
private void executeName(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
- ObjectId oid = idMan.readId(bb);
+ ObjectId oid = idMan.readObjectId(bb);
ThreadGroup group = (ThreadGroup) oid.getObject();
JdwpString.writeString(os, group.getName());
}
@@ -103,17 +99,17 @@ public class ThreadGroupReferenceCommandSet implements CommandSet
private void executeParent(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
- ObjectId oid = idMan.readId(bb);
+ ObjectId oid = idMan.readObjectId(bb);
ThreadGroup group = (ThreadGroup) oid.getObject();
ThreadGroup parent = group.getParent();
- ObjectId parentId = idMan.getId(parent);
+ ObjectId parentId = idMan.getObjectId(parent);
parentId.write(os);
}
private void executeChildren(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
- ObjectId oid = idMan.readId(bb);
+ ObjectId oid = idMan.readObjectId(bb);
ThreadGroup group = (ThreadGroup) oid.getObject();
ThreadGroup jdwpGroup = Thread.currentThread().getThreadGroup();
@@ -143,7 +139,7 @@ public class ThreadGroupReferenceCommandSet implements CommandSet
if (thread == null)
break; // No threads after this point
if (!thread.getThreadGroup().equals(jdwpGroup))
- idMan.getId(thread).write(os);
+ idMan.getObjectId(thread).write(os);
}
int numGroups = group.activeCount();
@@ -172,7 +168,7 @@ public class ThreadGroupReferenceCommandSet implements CommandSet
if (tgroup == null)
break; // No ThreadGroups after this point
if (!tgroup.equals(jdwpGroup))
- idMan.getId(tgroup).write(os);
+ idMan.getObjectId(tgroup).write(os);
}
}
}