# Class: com.pnfsoftware.jeb.core.units.code.android.adb.AdbWrapperFactory

A factory for ADB controllers. This object is also used to issue general \(device independent\) adb commands, such as `adb start-server`, `adb devices`, etc. Most methods in this class return null on error. 

 If an adb server exists, it is used as\-is. If one needs to be created, it will be spawned the first time a real adb command is issued \(the client can explicitly request it using [#initialize()](#initialize())\). Default listening settings are used, that is: `tcp:localhost:5037`. 

 Thread\-safe.

## Constructor: AdbWrapperFactory

Description: Create a wrapper with a [standard execution timeout](#STANDARD_TIMEOUT). The constructor will do its best to determine the path to the ADB program.
throws: 

## Constructor: AdbWrapperFactory
- parameter: `path`, type: `java.lang.String`

Description: Create a wrapper with a [standard execution timeout](#STANDARD_TIMEOUT).
parameter: path: ADB path, set to null for auto\-determination
throws: 

## Constructor: AdbWrapperFactory
- parameter: `path`, type: `java.lang.String`
- parameter: `defaultTimeout`, type: `long`

Description: Create a wrapper.
parameter: path: ADB path, set to null for auto\-determination
parameter: defaultTimeout: default command execution timeout in milliseconds \(0 means infinite\);            do not use negative values
throws: 

## Static Field: STANDARD_TIMEOUT
Type: `long`

Constant value: `5000`
Description: Standard command execution timeout is 5 seconds.

## Method: createWrapper
- parameter: `deviceSerial`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.android.adb.AdbWrapper`

Description: Create an ADB wrapper to issue command to a specific device, using a default timeout.
parameter: deviceSerial: optional device serial
return: 

## Method: createWrapper
- parameter: `deviceSerial`, type: `java.lang.String`
- parameter: `standardTimeout`, type: `long`
- return type: `com.pnfsoftware.jeb.core.units.code.android.adb.AdbWrapper`

Description: Create an ADB wrapper to issue command to a specific device.
parameter: deviceSerial: 
parameter: standardTimeout: 
return: 

## Method: getDefaultTimeout
- return type: `long`


## Method: getPath
- return type: `java.lang.String`

Description: Get the path to the ADB binary wrapped by this object.
return: 

## Method: getVersion
- return type: `java.lang.String`

Description: Retrieve the ADB version string.
return: 

## Method: initialize
- return type: `boolean`


## Method: listDevices
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.android.adb.AdbDevice>`


## Method: setDefaultTimeout
- parameter: `millis`, type: `long`


## Method: startServer
- return type: `boolean`

Description: Start the ADB server \(on the local machine\).
return: 

## Method: stopServer

Description: Stop the ADB server.

## Method: toString
- return type: `java.lang.String`


## Static Method: createStandardWrapper
- return type: `com.pnfsoftware.jeb.core.units.code.android.adb.AdbWrapper`


