Class TestServerPluginDescriptor.JvmTestServer
java.lang.Object
test.de.iip_ecosphere.platform.transport.AbstractTestServer
test.de.iip_ecosphere.platform.transport.TestServerPluginDescriptor.JvmTestServer
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.Server
- Enclosing class:
TestServerPluginDescriptor
A JVM-based test server, i.e., a wrapping server process implemented through an own JVM process. By convention,
passes the port number as first process argument.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJvmTestServer(String id, String cls, de.iip_ecosphere.platform.support.ServerAddress address, File installDir, TestServerPluginDescriptor.ProcessUpSupplier checker) Creates the server instance. -
Method Summary
Modifier and TypeMethodDescriptionsetUpTimeout(int upTimeout) Changes the timeout to wait for the JVM to be up.de.iip_ecosphere.platform.support.Serverstart()voidstop(boolean dispose) Methods inherited from class test.de.iip_ecosphere.platform.transport.AbstractTestServer
applyBaseDir, extractConfiguration, extractConfiguration, getConfigDir, getConfigDir, getInteger, getInteger, getString, runsFromJar, setConfigDir
-
Field Details
-
id
-
cls
-
proc
-
address
private de.iip_ecosphere.platform.support.ServerAddress address -
installDir
-
checker
-
upTimeout
private int upTimeout
-
-
Constructor Details
-
JvmTestServer
public JvmTestServer(String id, String cls, de.iip_ecosphere.platform.support.ServerAddress address, File installDir, TestServerPluginDescriptor.ProcessUpSupplier checker) Creates the server instance.- Parameters:
id- the plugin idcls- the class to start (better string to avoid class loading)address- the server address to supply to the server instanceinstallDir- the installation directory of the plugin, may be nullchecker- the process up checker
-
-
Method Details
-
setUpTimeout
Changes the timeout to wait for the JVM to be up.- Parameters:
upTimeout- the timeout, disables waiting if negativ, shall be larger than 200 (else set to 250)- Returns:
- this for chaining
-
start
public de.iip_ecosphere.platform.support.Server start() -
stop
public void stop(boolean dispose)
-