mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
CE-1887 Test on QAppJavalinServer
This commit is contained in:
@ -74,6 +74,8 @@ public class QApplicationJavalinServer
|
||||
private long millisBetweenHotSwaps = 2500;
|
||||
private Consumer<QInstance> hotSwapCustomizer = null;
|
||||
|
||||
private Javalin service;
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -94,7 +96,7 @@ public class QApplicationJavalinServer
|
||||
{
|
||||
QInstance qInstance = application.defineValidatedQInstance();
|
||||
|
||||
Javalin service = Javalin.create(config ->
|
||||
service = Javalin.create(config ->
|
||||
{
|
||||
if(serveFrontendMaterialDashboard)
|
||||
{
|
||||
@ -187,6 +189,22 @@ public class QApplicationJavalinServer
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
**
|
||||
***************************************************************************/
|
||||
public void stop()
|
||||
{
|
||||
if(this.service == null)
|
||||
{
|
||||
LOG.info("Stop called, but there is no javalin service, so noop.");
|
||||
return;
|
||||
}
|
||||
|
||||
this.service.stop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** If there's a qInstanceHotSwapSupplier, and its been a little while, replace
|
||||
** the qInstance with a new one from the supplier. Meant to be used while doing
|
||||
@ -440,12 +458,14 @@ public class QApplicationJavalinServer
|
||||
/*******************************************************************************
|
||||
** Fluent setter for MILLIS_BETWEEN_HOT_SWAPS
|
||||
*******************************************************************************/
|
||||
public void withMillisBetweenHotSwaps(long millisBetweenHotSwaps)
|
||||
public QApplicationJavalinServer withMillisBetweenHotSwaps(long millisBetweenHotSwaps)
|
||||
{
|
||||
this.millisBetweenHotSwaps = millisBetweenHotSwaps;
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for hotSwapCustomizer
|
||||
*******************************************************************************/
|
||||
@ -506,5 +526,4 @@ public class QApplicationJavalinServer
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user