Interface RunnableContainer
-
- All Known Subinterfaces:
EmbeddedLocalContainer
,InstalledLocalContainer
,JBoss5xInstalledLocalContainer
,JBossInstalledLocalContainer
,LocalContainer
,WebLogicLocalContainer
,WebLogicLocalScriptingContainer
- All Known Implementing Classes:
AbstractCatalinaEmbeddedLocalContainer
,AbstractCatalinaInstalledLocalContainer
,AbstractEmbeddedLocalContainer
,AbstractGlassFishInstalledLocalContainer
,AbstractInstalledLocalContainer
,AbstractJBoss5xInstalledLocalContainer
,AbstractJBossInstalledLocalContainer
,AbstractJettyEmbeddedLocalContainer
,AbstractJonasInstalledLocalContainer
,AbstractJRunInstalledLocalContainer
,AbstractLocalContainer
,AbstractOc4j10xInstalledLocalContainer
,AbstractOrionInstalledLocalContainer
,AbstractResinInstalledLocalContainer
,AbstractWebLogicInstalledLocalContainer
,AbstractWildFlyInstalledLocalContainer
,AbstractWildFlySwarmInstalledLocalContainer
,Geronimo1xInstalledLocalContainer
,Geronimo2xInstalledLocalContainer
,Geronimo3xInstalledLocalContainer
,GlassFish2xInstalledLocalContainer
,GlassFish3xInstalledLocalContainer
,GlassFish4xInstalledLocalContainer
,GlassFish5xInstalledLocalContainer
,GlassFish6xInstalledLocalContainer
,GlassFish7xInstalledLocalContainer
,GlassFish8xInstalledLocalContainer
,JBoss3xInstalledLocalContainer
,JBoss42xInstalledLocalContainer
,JBoss4xInstalledLocalContainer
,JBoss51xInstalledLocalContainer
,JBoss5xInstalledLocalContainer
,JBoss61xInstalledLocalContainer
,JBoss6xInstalledLocalContainer
,JBoss71xInstalledLocalContainer
,JBoss72xInstalledLocalContainer
,JBoss73xInstalledLocalContainer
,JBoss74xInstalledLocalContainer
,JBoss75xInstalledLocalContainer
,JBoss7xInstalledLocalContainer
,Jetty10xEmbeddedLocalContainer
,Jetty10xInstalledLocalContainer
,Jetty11xEmbeddedLocalContainer
,Jetty11xInstalledLocalContainer
,Jetty12xInstalledLocalContainer
,Jetty5xEmbeddedLocalContainer
,Jetty6xEmbeddedLocalContainer
,Jetty6xInstalledLocalContainer
,Jetty7xEmbeddedLocalContainer
,Jetty7xInstalledLocalContainer
,Jetty8xEmbeddedLocalContainer
,Jetty8xInstalledLocalContainer
,Jetty9xEmbeddedLocalContainer
,Jetty9xInstalledLocalContainer
,Jo1xInstalledLocalContainer
,Jonas4xInstalledLocalContainer
,Jonas5xInstalledLocalContainer
,JRun4xInstalledLocalContainer
,LibertyInstalledLocalContainer
,Oc4j10xInstalledLocalContainer
,Oc4j9xInstalledLocalContainer
,PayaraInstalledLocalContainer
,Resin31xInstalledLocalContainer
,Resin3xInstalledLocalContainer
,Resin4xInstalledLocalContainer
,Tomcat10xEmbeddedLocalContainer
,Tomcat10xInstalledLocalContainer
,Tomcat11xEmbeddedLocalContainer
,Tomcat11xInstalledLocalContainer
,Tomcat4xInstalledLocalContainer
,Tomcat5xEmbeddedLocalContainer
,Tomcat5xInstalledLocalContainer
,Tomcat6xEmbeddedLocalContainer
,Tomcat6xInstalledLocalContainer
,Tomcat7xEmbeddedLocalContainer
,Tomcat7xInstalledLocalContainer
,Tomcat8xEmbeddedLocalContainer
,Tomcat8xInstalledLocalContainer
,Tomcat9xEmbeddedLocalContainer
,Tomcat9xInstalledLocalContainer
,Tomee10xInstalledLocalContainer
,Tomee1xInstalledLocalContainer
,Tomee7xInstalledLocalContainer
,Tomee8xInstalledLocalContainer
,Tomee9xInstalledLocalContainer
,WebLogic103xInstalledLocalContainer
,WebLogic10xInstalledLocalContainer
,WebLogic121xInstalledLocalContainer
,WebLogic122xInstalledLocalContainer
,WebLogic12xInstalledLocalContainer
,WebLogic14xInstalledLocalContainer
,WebLogic8xInstalledLocalContainer
,WebLogic9xInstalledLocalContainer
,WebSphere85xInstalledLocalContainer
,WebSphere9xInstalledLocalContainer
,WildFly10xInstalledLocalContainer
,WildFly11xInstalledLocalContainer
,WildFly12xInstalledLocalContainer
,WildFly13xInstalledLocalContainer
,WildFly14xInstalledLocalContainer
,WildFly15xInstalledLocalContainer
,WildFly16xInstalledLocalContainer
,WildFly17xInstalledLocalContainer
,WildFly18xInstalledLocalContainer
,WildFly19xInstalledLocalContainer
,WildFly20xInstalledLocalContainer
,WildFly21xInstalledLocalContainer
,WildFly22xInstalledLocalContainer
,WildFly23xInstalledLocalContainer
,WildFly24xInstalledLocalContainer
,WildFly25xInstalledLocalContainer
,WildFly26xInstalledLocalContainer
,WildFly27xInstalledLocalContainer
,WildFly28xInstalledLocalContainer
,WildFly29xInstalledLocalContainer
,WildFly30xInstalledLocalContainer
,WildFly31xInstalledLocalContainer
,WildFly32xInstalledLocalContainer
,WildFly33xInstalledLocalContainer
,WildFly8xInstalledLocalContainer
,WildFly9xInstalledLocalContainer
,WildFlySwarm2017xInstalledLocalContainer
public interface RunnableContainer
All methods that a container that can be started/stopped must implement.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getOutput()
long
getTimeout()
boolean
isAppend()
void
restart()
Restarts the container.void
setAppend(boolean shouldAppend)
Sets whether output of the container should be appended to an existing file, or the existing file should be truncated.void
setOutput(String output)
void
setTimeout(long timeout)
void
start()
Starts the container.void
stop()
Stops the container.
-
-
-
Method Detail
-
start
void start()
Starts the container. It blocks until the container is fully started unless it doesn't start before the timeout period in which case an exception will be thrown.
-
stop
void stop()
Stops the container. It blocks until the container is fully stopped unless it doesn't stop before the timeout period in which case an exception will be thrown.
-
restart
void restart()
Restarts the container. It blocks until the container is fully stopped (if it not already is) and then blocks until the container is fully started unless it doesn't start before the timeout period in which case an exception will be thrown.
-
setOutput
void setOutput(String output)
- Parameters:
output
- the file to which the container's output will be logged to. Note that we're passing a String instead of a File because we want to leave the possibility of using URIs for specifying the home location.
-
getOutput
String getOutput()
- Returns:
- the file to which the container's output will be logged to. Note that we're returning a String instead of a File because we want to leave the possibility of using URIs for specifying the home location.
-
setTimeout
void setTimeout(long timeout)
- Parameters:
timeout
- the timeout (in ms) after which we consider the container cannot be started or stopped.
-
getTimeout
long getTimeout()
- Returns:
- the timeout (in ms) after which we consider the container cannot be started or or stopped.
-
setAppend
void setAppend(boolean shouldAppend)
Sets whether output of the container should be appended to an existing file, or the existing file should be truncated.- Parameters:
shouldAppend
- Whether output should be appended to or not
-
isAppend
boolean isAppend()
- Returns:
- true if the output of the container should be appended to the output file or false otherwise
-
-