Class NativeSubprocessTransportFactory
java.lang.Object
com.codename1.bluetooth.helper.NativeSubprocessTransportFactory
- All Implemented Interfaces:
HelperTransportFactory
public abstract class NativeSubprocessTransportFactory
extends Object
implements HelperTransportFactory
Builds NativeSubprocessTransports 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
- the
cn1.bluetooth.helperPathsystem property (an explicit path), or - the bare executable name, spawned through the OS
PATHsearch (posix_spawnpon Linux,CreateProcessPATHlookup on Windows), so a helper bundled next to the app or installed on thePATHis found without extra plumbing.
The subclass supplies the actual transport (which carries the port's
native proc* bridge) via createTransport(List).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe system property that overrides the helper location. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()A new, un-started transport for one helper launch.protected abstract NativeSubprocessTransportcreateTransport(List<String> command) Creates the port-specific transport bound to the given launch command (helper path + args).protected abstract StringexecutableName(String basename) The executable name on this OS -- Windows appends.exe.
-
Field Details
-
HELPER_PATH_PROPERTY
The system property that overrides the helper location. Kept in sync with the JavaSE resolver's property name.- See Also:
-
-
Constructor Details
-
NativeSubprocessTransportFactory
public NativeSubprocessTransportFactory()
-
-
Method Details
-
create
Description copied from interface:HelperTransportFactoryA new, un-started transport for one helper launch.- Specified by:
createin interfaceHelperTransportFactory
-
createTransport
Creates the port-specific transport bound to the given launch command (helper path + args). Implemented per port over its nativeproc*bridge. -
executableName
-