Interface WebswingShutdownListener
-
public interface WebswingShutdownListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intonBeforeShutdown(OnBeforeShutdownEvent event)Invoked before Webswing requests application to exit.voidonShutdown()Invoked when Webswing requests swing application to exit.
-
-
-
Method Detail
-
onBeforeShutdown
int onBeforeShutdown(OnBeforeShutdownEvent event)
Invoked before Webswing requests application to exit. Do not execute long operations in this listener - listener execution will be interrupted if blocking for > 3 seconds and the application will exit without delay. Connection to server is still open when this callback is triggered. This method can delay the shutdown. CallingWebswingApi.resetInactivityTimeout()within the delay period will cancel the shutdown sequence. This method is not called on the event dispatch thread.- Parameters:
event- Event contains the reason of this shutdown - either triggered from Admin console's rest interface or by inactivity- Returns:
- number of seconds to delay the shutdown, returning 0 will cause shutdown without delay (even if
WebswingApi.resetInactivityTimeout()has been called)
-
onShutdown
void onShutdown()
Invoked when Webswing requests swing application to exit. This method should cause this process to exit (not necessarily in the same thread). When this method is called, connection to server is already closed This method is not called on the event dispatch thread.
-
-