Module com.github.alexdlaird.ngrok
Class NgrokProcess.ProcessMonitor
- java.lang.Object
-
- com.github.alexdlaird.ngrok.process.NgrokProcess.ProcessMonitor
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- NgrokProcess
public static class NgrokProcess.ProcessMonitor extends java.lang.Object implements java.lang.Runnable
A Runnable that monitors thengrok
process.
-
-
Constructor Summary
Constructors Constructor Description ProcessMonitor(NgrokProcess ngrokProcess, JavaNgrokConfig javaNgrokConfig)
Construct to monitor a {link @Process} monitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.List<NgrokLog>
getLogs()
Deprecated.UseNgrokProcess.getLogs()
instead.boolean
isMonitoring()
Whether the thread is continuing to monitorngrok
logs.void
run()
void
stop()
Set the monitor thread to stop monitoring the ngrok process after the next log event.
-
-
-
Constructor Detail
-
ProcessMonitor
public ProcessMonitor(NgrokProcess ngrokProcess, JavaNgrokConfig javaNgrokConfig)
Construct to monitor a {link @Process} monitor.- Parameters:
ngrokProcess
- The Process to monitor.javaNgrokConfig
- The config to use when monitoring the Process.
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
isMonitoring
public boolean isMonitoring()
Whether the thread is continuing to monitorngrok
logs.
-
stop
public void stop()
Set the monitor thread to stop monitoring the ngrok process after the next log event. This will not necessarily terminate the process immediately, as the process may currently be idle, rather it sets a flag on the thread telling it to terminate the next time it wakes up.This has no impact on the ngrok process itself, only
java-ngrok
's monitor of the process and its logs.
-
getLogs
@Deprecated public java.util.List<NgrokLog> getLogs()
Deprecated.UseNgrokProcess.getLogs()
instead.Get thengrok
logs.
-
-