public interface BrowserManager extends Remote
Modifier and Type | Method and Description |
---|---|
void |
keepAlive(int token,
long keepAliveMs)
Keeps the browser process represented by token alive for keepAliveMs,
starting now.
|
void |
killBrowser(int token)
Forceably kills the browser process represented by
token ,
disregarding any previous calls to keepAlive(int, long) . |
int |
launchNewBrowser(String url,
long keepAliveMs)
Launches a new browser window for the specified URL.
|
void keepAlive(int token, long keepAliveMs) throws RemoteException
token
- an opaque token representing the browser windowkeepAliveMs
- the number of milliseconds to let the browser process
live; if roughly keepAliveMs
milliseconds elapse
without a subsequent call to this method, the browser process
associated with token
will be forceably terminatedIllegalStateException
- if the process represented by token has
already terminated.IllegalArgumentException
- if token does not represent a process that
was returned from launchNewBrowser(String, long)
.IllegalArgumentException
- if keepAliveMs <= 0.RemoteException
- if an error occurs calling a remote implementation.void killBrowser(int token) throws RemoteException
token
,
disregarding any previous calls to keepAlive(int, long)
. If the
process has already terminated, this method completes normally.token
- an opaque token representing the browser window processIllegalArgumentException
- if token does not represent a process that
was returned from launchNewBrowser(String, long)
.RemoteException
- if an error occurs calling a remote implementation.int launchNewBrowser(String url, long keepAliveMs) throws RemoteException
url
- the URL to browse tokeepAliveMs
- the initial number of milliseconds to let the browser
process live; if roughly keepAliveMs
milliseconds
expire without a subsequent call to keepAlive(int, long)
,
the browser process will be forceably terminatedIllegalArgumentException
- if url
is null
.IllegalArgumentException
- if keepAliveMs
<= 0.RuntimeException
- if an error occurs launching the browser process.RemoteException
- if an error occurs calling a remote implementation.Copyright © 2016. All rights reserved.