
public.javadoc.org.spincast.plugins.processutils.JarExecutionHandlerDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
JarExecutionHandlerDefault (org.spincast:spincast-framework 1.7.1 API)
org.spincast.plugins.processutils
Class JarExecutionHandlerDefault
- java.lang.Object
-
- org.spincast.plugins.processutils.JarExecutionHandlerDefault
-
- All Implemented Interfaces:
- JarExecutionHandler
public class JarExecutionHandlerDefault
extends Object
implements JarExecutionHandler
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
JarExecutionHandlerDefault()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Process
getJarProcess()
The created process.
protected boolean
isKillingRequested()
void
killJarProcess()
Kill the jar execution process.
void
onException(Exception ex)
Called if an exception occured during the process
launch.
void
onExit(int exitVal)
Called when the jar execution process exits
void
setJarProcess(Process jarProcess)
Called when the process is created.
void
setKillingRequested()
void
waitForPortOpen(String host,
int port,
int nbrTry,
int sleepMilliseconds)
Wait for the specified host:port to be listened to.
-
-
Method Detail
-
getJarProcess
public Process getJarProcess()
Description copied from interface: JarExecutionHandler
The created process.
- Specified by:
getJarProcess
in interface JarExecutionHandler
-
setJarProcess
public void setJarProcess(Process jarProcess)
Description copied from interface: JarExecutionHandler
Called when the process is created.
- Specified by:
setJarProcess
in interface JarExecutionHandler
-
isKillingRequested
protected boolean isKillingRequested()
-
setKillingRequested
public void setKillingRequested()
-
waitForPortOpen
public void waitForPortOpen(String host,
int port,
int nbrTry,
int sleepMilliseconds)
Wait for the specified host:port to be listened to.
- Throws:
PortNotOpenException
- if the port is still not
reachable after "sleepMilliseconds" milliseconds.
-
killJarProcess
public void killJarProcess()
Kill the jar execution process.
- Specified by:
killJarProcess
in interface JarExecutionHandler
-
onExit
public void onExit(int exitVal)
Called when the jar execution process exits
- Specified by:
onExit
in interface JarExecutionHandler
-
onException
public void onException(Exception ex)
Description copied from interface: JarExecutionHandler
Called if an exception occured during the process
launch.
- Specified by:
onException
in interface JarExecutionHandler
Copyright © 2019. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy