public interface Server
Server instances are obtained using the ServerBuilder
. The methods of this interface
can be used to manage and control the server instance.
There are some limitations when working with an embedded server: environment variables
are not checked, and jvm.options
and server.env
files are not read.
Management of the JVM and environment is assumed to be managed by the caller.
bootstrap.properties
and server.xml
files will be read as normal.
Consumers of this SPI must not implement this interface. A server instance is thread safe.
ServerBuilder.build()
Modifier and Type | Interface and Description |
---|---|
static interface |
Server.Result
Result of a start or stop operation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning() |
java.util.concurrent.Future<Server.Result> |
start(java.util.Map<java.lang.String,java.lang.String> props,
java.lang.String... arguments)
Start the Liberty server instance using the given arguments.
|
java.util.concurrent.Future<Server.Result> |
start(java.lang.String... arguments)
Start the Liberty server instance using the given arguments.
|
java.util.concurrent.Future<Server.Result> |
stop(java.lang.String... arguments)
Stop the Liberty server instance.
|
java.util.concurrent.Future<Server.Result> start(java.lang.String... arguments)
arguments
- Command line arguments for startjava.util.concurrent.Future<Server.Result> start(java.util.Map<java.lang.String,java.lang.String> props, java.lang.String... arguments)
props
- Additional properties that will supersede any values read from
bootstrap.properties
or System.properties
arguments
- Command line arguments for startjava.util.concurrent.Future<Server.Result> stop(java.lang.String... arguments)
arguments
- Command line arguments for stopboolean isRunning()