private void cleanUp() { Page p = page.get(); if (p != null) { p.cleanUp(); } for (WebWindow window : webClient.get().getWebWindows()) { window.getJobManager().removeAllJobs(); } page.remove(); webClient.get().close(); webClient.remove(); }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br> * * Adds a new window to the list of available windows. * * @param webWindow the new WebWindow */ public void registerWebWindow(final WebWindow webWindow) { WebAssert.notNull("webWindow", webWindow); windows_.add(webWindow); // register JobManager here but don't deregister in deregisterWebWindow as it can live longer jobManagers_.add(new WeakReference<>(webWindow.getJobManager())); }
/** * Cancels a time-out previously set with the <tt>setTimeout</tt> method. * * @param timeoutId identifier for the timeout to clear (returned by <tt>setTimeout</tt>) */ public void jsxFunction_clearTimeout(final int timeoutId) { LOG.debug("clearTimeout(" + timeoutId + ")"); getWebWindow().getJobManager().removeJob(timeoutId); }
/** * Cancels a time-out previously set with the <tt>setTimeout</tt> method. * * @param timeoutId identifier for the timeout to clear (returned by <tt>setTimeout</tt>) */ public void jsxFunction_clearTimeout(final int timeoutId) { LOG.debug("clearTimeout(" + timeoutId + ")"); getWebWindow().getJobManager().removeJob(timeoutId); }
/** * Cancels a time-out previously set with the <tt>setTimeout</tt> method. * * @param timeoutId identifier for the timeout to clear (returned by <tt>setTimeout</tt>) */ public void jsxFunction_clearTimeout(final int timeoutId) { LOG.debug("clearTimeout(" + timeoutId + ")"); getWebWindow().getJobManager().removeJob(timeoutId); }
/** * Cancels the interval previously started using the setInterval method. * Current implementation does nothing. * @param intervalID specifies the interval to cancel as returned by the setInterval method * @see <a href="http://msdn.microsoft.com/en-us/library/ms536353.aspx">MSDN documentation</a> */ public void jsxFunction_clearInterval(final int intervalID) { LOG.debug("clearInterval(" + intervalID + ")"); getWebWindow().getJobManager().removeJob(intervalID); }
/** * Cancels the interval previously started using the setInterval method. * Current implementation does nothing. * @param intervalID specifies the interval to cancel as returned by the setInterval method * @see <a href="http://msdn.microsoft.com/en-us/library/ms536353.aspx">MSDN documentation</a> */ public void jsxFunction_clearInterval(final int intervalID) { LOG.debug("clearInterval(" + intervalID + ")"); getWebWindow().getJobManager().removeJob(intervalID); }
/** * Cancels the interval previously started using the setInterval method. * Current implementation does nothing. * @param intervalID specifies the interval to cancel as returned by the setInterval method * @see <a href="http://msdn.microsoft.com/en-us/library/ms536353.aspx">MSDN documentation</a> */ public void jsxFunction_clearInterval(final int intervalID) { LOG.debug("clearInterval(" + intervalID + ")"); getWebWindow().getJobManager().removeJob(intervalID); }
/** * Register a window with the eventLoop. * @param newWindow the new web window */ @Override public void addWindow(final WebWindow newWindow) { final JavaScriptJobManager jobManager = newWindow.getJobManager(); if (jobManager != null) { updateJobMangerList(jobManager); startThreadIfNeeded(); } }
private void cleanUp() { page.get().cleanUp(); for (WebWindow window : webClient.get().getWebWindows()) { window.getJobManager().removeAllJobs(); } page.remove(); webClient.get().close(); webClient.remove(); }
protected void closeWebClient(WebClient wc) { List<WebWindow> windows = wc.getWebWindows(); for (WebWindow wd : windows) { // wd.getThreadManager().interruptAll(); wd.getJobManager().removeAllJobs(); } wc.closeAllWindows(); }
/** * Register a window with the eventLoop. * @param newWindow the new web window */ @Override public void addWindow(final WebWindow newWindow) { final JavaScriptJobManager jobManager = newWindow.getJobManager(); if (jobManager != null) { updateJobMangerList(jobManager); startThreadIfNeeded(); } }
/** * Cancels a time-out previously set with the * {@link #setTimeout(Context, Scriptable, Object[], Function)} method. * * @param timeoutId identifier for the timeout to clear * as returned by {@link #setTimeout(Context, Scriptable, Object[], Function)} */ @JsxFunction public void clearTimeout(final int timeoutId) { if (LOG.isDebugEnabled()) { LOG.debug("clearTimeout(" + timeoutId + ")"); } getWebWindow().getJobManager().removeJob(timeoutId); }
/** * Cancels the current HTTP request. */ public void jsxFunction_abort() { getWindow().getWebWindow().getJobManager().stopJob(threadID_); }
/** * Cancels the current HTTP request. */ public void jsxFunction_abort() { getWindow().getWebWindow().getJobManager().stopJob(threadID_); }
/** * Cancels the current HTTP request. */ public void jsxFunction_abort() { getWindow().getWebWindow().getJobManager().stopJob(threadID_); }
/** * Cancels the current HTTP request. */ @JsxFunction public void abort() { getWindow().getWebWindow().getJobManager().stopJob(jobID_); }
/** * Cancels the current HTTP request. */ @JsxFunction public void abort() { getWindow().getWebWindow().getJobManager().stopJob(jobID_); }
/** * Cancels the current HTTP request. */ @JsxFunction public void abort() { getWindow().getWebWindow().getJobManager().stopJob(jobID_); setState(STATE_UNSENT, Context.getCurrentContext()); }
/** * Cancels the current HTTP request. */ @JsxFunction public void abort() { getWindow().getWebWindow().getJobManager().stopJob(jobID_); setState(STATE_UNSENT, Context.getCurrentContext()); }