public class OperaLauncherRunner extends AbstractOperaRunner implements OperaRunner
| Modifier and Type | Field and Description |
|---|---|
static File |
LAUNCHER_DEFAULT_LOCATION |
static File |
LAUNCHER_DIRECTORY |
static String |
LAUNCHER_ENV_VAR |
static String |
LAUNCHER_NAME |
settings| Constructor and Description |
|---|
OperaLauncherRunner() |
OperaLauncherRunner(OperaSettings s) |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertLauncherGood(File launcher)
Asserts whether given launcher exists, is a file and that it's executable.
|
static List<String> |
buildArguments(OperaSettings settings,
int launcherPort) |
ScreenCaptureReply |
captureScreen()
Take screenshot using external program.
|
ScreenCaptureReply |
captureScreen(long timeout)
Take screenshot using external program.
|
ScreenCaptureReply |
captureScreen(long timeout,
List<String> knownMD5s)
Take screenshot using external program.
|
String |
getOperaCrashlog()
If Opera crashed there should be a crashlog.
|
boolean |
hasOperaCrashed()
Did Opera crash? This is reset on next call, so if you don't check you won't know.
|
boolean |
isOperaRunning()
Is Opera running?
|
boolean |
isOperaRunning(int processId) |
void |
shutdown()
In case the com.opera.core.systems.runner.runner has open sockets, they need to be closed.
|
void |
startOpera()
Start Opera, does nothing if Opera is already started.
|
void |
stopOpera()
Stops Opera, does nothing if Opera isn't running.
|
protected static Level |
toLauncherLoggingLevel(Level level)
The launcher allows for the following logging levels: "FINEST", "FINE", "INFO", "WARNING",
"SEVERE".
|
getSettings, sleeppublic static final String LAUNCHER_ENV_VAR
public static final String LAUNCHER_NAME
public static final File LAUNCHER_DIRECTORY
public static final File LAUNCHER_DEFAULT_LOCATION
public OperaLauncherRunner()
public OperaLauncherRunner(OperaSettings s)
public static List<String> buildArguments(OperaSettings settings, int launcherPort)
public void startOpera()
throws OperaRunnerException
startOpera in interface OperaRunnerOperaRunnerException - if launcher is shut down or not runningpublic void stopOpera()
throws OperaRunnerException
stopOpera in interface OperaRunnerOperaRunnerException - if launcher is shut down or not runningpublic boolean isOperaRunning()
OperaRunnerisOperaRunning in interface OperaRunnerpublic boolean isOperaRunning(int processId)
public boolean hasOperaCrashed()
OperaRunnerhasOperaCrashed in interface OperaRunnerpublic String getOperaCrashlog()
OperaRunnergetOperaCrashlog in interface OperaRunnerpublic void shutdown()
OperaRunnershutdown in interface OperaRunnerpublic ScreenCaptureReply captureScreen() throws OperaRunnerException
captureScreen in interface OperaRunnerOperaRunnerException - if runner is shutdown or not runningpublic ScreenCaptureReply captureScreen(long timeout) throws OperaRunnerException
captureScreen in interface OperaRunnertimeout - attempt to take the screen capture until the timeout is reachedOperaRunnerException - if runner is shutdown or not runningpublic ScreenCaptureReply captureScreen(long timeout, List<String> knownMD5s) throws OperaRunnerException
captureScreen in interface OperaRunnertimeout - attempt to take the screen capture until the timeout is reachedknownMD5s - a list of hashes of known MD5's, causing no image data to be storedOperaRunnerException - if runner is shutdown or not runningpublic static void assertLauncherGood(File launcher) throws IOException
launcher - the launcher to assertIOException - if there is a problem with the provided launcherprotected static Level toLauncherLoggingLevel(Level level)
level - the Java logging levelCopyright © 2012. All Rights Reserved.