com.android.ddmlib
Class DebugPortManager

java.lang.Object
  extended by com.android.ddmlib.DebugPortManager

public class DebugPortManager
extends java.lang.Object

Centralized point to provide a DebugPortManager.IDebugPortProvider to ddmlib.

When Client objects are created, they start listening for debuggers on a specific port. The default behavior is to start with DdmPreferences.getDebugPortBase() and increment this value for each new Client.

This DebugPortManager allows applications using ddmlib to provide a custom port provider on a per-Client basis, depending on the device/emulator they are running on, and/or their names.


Nested Class Summary
static interface DebugPortManager.IDebugPortProvider
          Classes which implement this interface provide a method that provides a non random debugger port for a newly created Client.
 
Constructor Summary
DebugPortManager()
           
 
Method Summary
static void setProvider(DebugPortManager.IDebugPortProvider provider)
          Sets the DebugPortManager.IDebugPortProvider that will be used when a new Client requests a debugger port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugPortManager

public DebugPortManager()
Method Detail

setProvider

public static void setProvider(DebugPortManager.IDebugPortProvider provider)
Sets the DebugPortManager.IDebugPortProvider that will be used when a new Client requests a debugger port.

Parameters:
provider - the IDebugPortProvider to use.