|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opera.core.systems.runner.OperaRunner
com.opera.core.systems.runner.launcher.OperaLauncherRunner
public class OperaLauncherRunner
OperaLauncherRunner implements an interface in C++ with a Java API for controlling the Opera binary.
| Field Summary | |
|---|---|
static String |
LAUNCHER_ENV_VAR
|
| Fields inherited from class com.opera.core.systems.runner.OperaRunner |
|---|
logger, settings |
| Constructor Summary | |
|---|---|
OperaLauncherRunner()
|
|
OperaLauncherRunner(OperaSettings s)
|
|
| Method Summary | |
|---|---|
static void |
assertLauncherGood(File launcher)
Asserts whether given launcher exists, is a file and that it's executable. |
protected com.google.common.collect.ImmutableList<String> |
buildArguments()
|
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)
|
static File |
launcherDefaultLocation()
|
ScreenShotReply |
saveScreenshot(long timeout,
String... hashes)
Take screenshots! |
void |
shutdown()
Handles safe shutdown of the OperaRunner class. |
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". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LAUNCHER_ENV_VAR
| Constructor Detail |
|---|
public OperaLauncherRunner()
public OperaLauncherRunner(OperaSettings s)
| Method Detail |
|---|
protected com.google.common.collect.ImmutableList<String> buildArguments()
public void startOpera()
OperaRunner
startOpera in interface OperaRunnerstartOpera in class OperaRunnerpublic void stopOpera()
OperaRunner
stopOpera in interface OperaRunnerstopOpera in class OperaRunnerpublic boolean isOperaRunning()
OperaRunner
isOperaRunning in interface OperaRunnerisOperaRunning in class OperaRunnerpublic boolean isOperaRunning(int processId)
isOperaRunning in interface OperaRunnerisOperaRunning in class OperaRunnerpublic boolean hasOperaCrashed()
OperaRunner
hasOperaCrashed in interface OperaRunnerhasOperaCrashed in class OperaRunnerpublic String getOperaCrashlog()
OperaRunner
getOperaCrashlog in interface OperaRunnergetOperaCrashlog in class OperaRunnerpublic void shutdown()
OperaRunner
shutdown in interface OperaRunnershutdown in class OperaRunner
public ScreenShotReply saveScreenshot(long timeout,
String... hashes)
saveScreenshot in interface OperaRunnersaveScreenshot in class OperaRunnertimeout - attempt to take the screenshot until the timeout is reachedhashes - an arbitrary list of hashes to compare with
public static File launcherDefaultLocation()
public static void assertLauncherGood(File launcher)
throws IOException
launcher - the launcher to assert
IOException - if there is a problem with the provided launcherprotected static Level toLauncherLoggingLevel(Level level)
level - the Java logging level
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||