Package org.intermine.web.logic.query
Interface QueryMonitor
-
- All Known Implementing Classes:
PageTableQueryMonitor
,QueryCountQueryMonitor
,QueryMonitorTimeout
public interface QueryMonitor
Interface passed to SessionMethods runQuery method which is polled every so-often while the query runs in order to decide whether or not to cancel the query. Instances of this interface are used in conjunction with a periodic browser refresh to detect and act upon user cancellation (the user closing their browser window or navigating to a different page).- Author:
- Thomas Riley
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
queryCancelled()
Called when the query is cancelled.void
queryCancelledWithError()
Called when the query stopped with an error.void
queryCompleted()
Called when the query has completed.boolean
shouldCancelQuery()
Called intermittently while a query is run providing an opportunity to cancel the query.
-
-
-
Method Detail
-
shouldCancelQuery
boolean shouldCancelQuery()
Called intermittently while a query is run providing an opportunity to cancel the query. param results the Results object associated with the running query param request the http servlet request- Returns:
- false if the query should be cancelled, otherwise true
-
queryCompleted
void queryCompleted()
Called when the query has completed.
-
queryCancelledWithError
void queryCancelledWithError()
Called when the query stopped with an error. The error message should be in the session.
-
queryCancelled
void queryCancelled()
Called when the query is cancelled. Usually as a result of shouldCancelQuery returning true.
-
-