com.android.ddmlib
Class Debugger

java.lang.Object
  extended by com.android.ddmlib.jdwp.JdwpAgent
      extended by com.android.ddmlib.Debugger

public class Debugger
extends JdwpAgent

This represents a pending or established connection with a JDWP debugger.


Method Summary
protected  void send(JdwpPacket packet)
          Send a packet to the debugger.
 java.lang.String toString()
          Represent the Debugger as a string.
 
Methods inherited from class com.android.ddmlib.jdwp.JdwpAgent
addJdwpInterceptor, addReplyInterceptor, clear, getJdwpProtocol, incoming, removeReplyInterceptor, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Represent the Debugger as a string.

Overrides:
toString in class java.lang.Object

send

protected void send(@NonNull
                    JdwpPacket packet)
             throws java.io.IOException
Send a packet to the debugger. Ideally, we can do this with a single channel write. If that doesn't happen, we have to prevent anybody else from writing to the channel until this packet completes, so we synchronize on the channel. Another goal is to avoid unnecessary buffer copies, so we write directly out of the JdwpPacket's ByteBuffer. We must synchronize on "mChannel" before writing to it. We want to coordinate the buffered data with mChannel creation, so this whole method is synchronized.

Specified by:
send in class JdwpAgent
Throws:
java.io.IOException