public class PythonService
extends java.lang.Object
Constructor and Description |
---|
PythonService(java.lang.String module,
java.util.List<java.lang.String> args) |
PythonService(java.lang.String module,
java.util.List<java.lang.String> args,
java.util.List<java.lang.String> extraPackages) |
PythonService(java.lang.String module,
java.lang.String... args) |
Modifier and Type | Method and Description |
---|---|
static int |
findAvailablePort() |
java.lang.AutoCloseable |
start() |
static void |
waitForPort(java.lang.String host,
int port,
int timeoutMs) |
PythonService |
withExtraPackages(java.util.List<java.lang.String> extraPackages)
Specifies that the given Python packages should be installed for this service environment.
|
public PythonService(java.lang.String module, java.util.List<java.lang.String> args, java.util.List<java.lang.String> extraPackages)
public PythonService(java.lang.String module, java.util.List<java.lang.String> args)
public PythonService(java.lang.String module, java.lang.String... args)
public PythonService withExtraPackages(java.util.List<java.lang.String> extraPackages)
extraPackages
- a list of pip-installable package specifications, such as would be found
in a requirements file.public java.lang.AutoCloseable start() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static int findAvailablePort() throws java.io.IOException
java.io.IOException
public static void waitForPort(java.lang.String host, int port, int timeoutMs) throws java.util.concurrent.TimeoutException, java.lang.InterruptedException
java.util.concurrent.TimeoutException
java.lang.InterruptedException