# Class NativeSubprocessTransportFactory

java.lang.Object
com.codename1.bluetooth.helper.NativeSubprocessTransportFactory

All Implemented Interfaces:
  `HelperTransportFactory`

public abstract class NativeSubprocessTransportFactory extends Object implements HelperTransportFactory

Builds `NativeSubprocessTransport`s for a native port. Resolving the helper binary on the native ports is deliberately simpler than the JavaSE classpath-extraction path: there is no runtime jar to extract from, so the helper is located by

1. the `cn1.bluetooth.helperPath` system property (an explicit path), or
2. the bare executable name, spawned through the OS `PATH` search (`posix_spawnp` on Linux, `CreateProcess` `PATH` lookup on Windows), so a helper bundled next to the app or installed on the `PATH` is found without extra plumbing.

The subclass supplies the actual transport (which carries the port's native `proc*` bridge) via `createTransport(List)`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `HELPER_PATH_PROPERTY`
  The system property that overrides the helper location.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NativeSubprocessTransportFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HelperTransport`
  `create()`
  A new, un-started transport for one helper launch.
  `protected abstract NativeSubprocessTransport`
  `createTransport(List<String> command)`
  Creates the port-specific transport bound to the given launch command (helper path + args).
  `protected abstract String`
  `executableName(String basename)`
  The executable name on this OS -- Windows appends `.exe`.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### HELPER_PATH_PROPERTY

    public static final String HELPER_PATH_PROPERTY
    The system property that overrides the helper location. Kept in sync with the JavaSE resolver's property name.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### NativeSubprocessTransportFactory

    public NativeSubprocessTransportFactory()

- ## Method Details

  - ### create

    public HelperTransport create()
    Description copied from interface: `HelperTransportFactory`
    A new, un-started transport for one helper launch.
    Specified by:
      `create` in interface `HelperTransportFactory`

  - ### createTransport

    protected abstract NativeSubprocessTransport createTransport(List<String> command)
    Creates the port-specific transport bound to the given launch command (helper path + args). Implemented per port over its native `proc*` bridge.

  - ### executableName

    protected abstract String executableName(String basename)
    The executable name on this OS -- Windows appends `.exe`.