Examples of ThreadId


Examples of com.sun.star.lib.uno.environments.remote.ThreadId

        Endpoint iSender, Endpoint iReceiver, String oId) throws Exception
    {
        Object params[] = new Object[]{new String[1]};
        iSender.writeRequest(
            oId, TypeDescription.getTypeDescription(TestXInterface.class),
            "methodWithOutParameter", new ThreadId(new byte[] { 0, 1 }),
            params);
        Message iMessage = iReceiver.readMessage();


        Object[] t_params = iMessage.getArguments();
        ((String [])t_params[0])[0] = "testString";

        // send an exception as reply
        iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null);
        iSender.readMessage();

        assure("", "testString".equals(((String [])params[0])[0]));
    }
View Full Code Here

Examples of com.sun.star.lib.uno.environments.remote.ThreadId

        Endpoint iSender, Endpoint iReceiver, String oId) throws Exception
    {
        Object params[] = new Object[]{new String[]{"inString"}};
        iSender.writeRequest(
            oId, TypeDescription.getTypeDescription(TestXInterface.class),
            "methodWithInOutParameter", new ThreadId(new byte[] { 0, 1 }),
            params);
        Message iMessage = iReceiver.readMessage();


        Object[] t_params = iMessage.getArguments();
        assure("", "inString".equals(((String [])t_params[0])[0]));

        // provide reply
        ((String [])t_params[0])[0] = "outString";

        // send an exception as reply
        iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null);
        iSender.readMessage();

        assure("", "outString".equals(((String [])params[0])[0]));
    }
View Full Code Here

Examples of gnu.classpath.jdwp.id.ThreadId

  }

  private void executeName(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException
  {
    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
    Thread thread = tid.getThread();
    JdwpString.writeString(os, thread.getName());
  }
View Full Code Here

Examples of gnu.classpath.jdwp.id.ThreadId

  }

  private void executeSuspend(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException
  {
    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
    Thread thread = tid.getThread();
    VMVirtualMachine.suspendThread(thread);
  }
View Full Code Here

Examples of gnu.classpath.jdwp.id.ThreadId

  }

  private void executeResume(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException
  {
    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
    Thread thread = tid.getThread();
    VMVirtualMachine.suspendThread(thread);
  }
View Full Code Here

Examples of gnu.classpath.jdwp.id.ThreadId

  }

  private void executeStatus(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException
  {
    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
    Thread thread = tid.getThread();
    int threadStatus = VMVirtualMachine.getThreadStatus(thread);
    // There's only one possible SuspendStatus...
    int suspendStatus = JdwpConstants.SuspendStatus.SUSPENDED;

    os.writeInt(threadStatus);
View Full Code Here

Examples of gnu.classpath.jdwp.id.ThreadId

  }

  private void executeThreadGroup(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException
  {
    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
    Thread thread = tid.getThread();
    ThreadGroup group = thread.getThreadGroup();
    ObjectId groupId = idMan.getObjectId(group);
    groupId.write(os);
  }
View Full Code Here

Examples of gnu.classpath.jdwp.id.ThreadId

  }

  private void executeFrames(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException
  {
    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
    Thread thread = tid.getThread();
    int startFrame = bb.getInt();
    int length = bb.getInt();

    ArrayList frames = VMVirtualMachine.getFrames(thread, startFrame, length);
    os.writeInt(frames.size());
View Full Code Here

Examples of gnu.classpath.jdwp.id.ThreadId

  }

  private void executeFrameCount(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException
  {
    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
    Thread thread = tid.getThread();

    int frameCount = VMVirtualMachine.getFrameCount(thread);
    os.writeInt(frameCount);
  }
View Full Code Here

Examples of gnu.classpath.jdwp.id.ThreadId

  }

  private void executeStop(ByteBuffer bb, DataOutputStream os)
      throws JdwpException, IOException
  {
    ThreadId tid = (ThreadId) idMan.readObjectId(bb);
    Thread thread = tid.getThread();
    ObjectId exception = idMan.readObjectId(bb);
    Throwable throwable = (Throwable) exception.getObject();
    thread.stop (throwable);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.