com.opera.core.systems.runner
Class OperaRunnerSettings

java.lang.Object
  extended by com.opera.core.systems.runner.OperaRunnerSettings
All Implemented Interfaces:
OperaRunnerSettings
Direct Known Subclasses:
OperaLauncherRunnerSettings

public class OperaRunnerSettings
extends Object
implements OperaRunnerSettings

Defines a settings object which impacts OperaRunner, the interface for controlling the Opera binary.

Author:
Andreas Tolf Tolfsen

Field Summary
protected  OperaArguments arguments
           
protected  Integer display
           
protected  String host
           
protected  Level loggingLevel
           
protected  boolean noQuit
           
protected  File operaBinary
           
protected  Integer port
           
protected  OperaProduct product
           
protected  String profile
           
 
Constructor Summary
OperaRunnerSettings()
           
 
Method Summary
 OperaArguments getArguments()
          Gets the arguments passed on to Opera.
 File getBinary()
          Returns the full path to the browser binary.
static OperaRunnerSettings getDefaultSettings()
           
 Integer getDisplay()
          Gets the X display.
 String getHost()
          The host Opera should connect to.
 Level getLoggingLevel()
          Returns the logging level of the started Opera process and the process handling mechanism.
 boolean getNoQuit()
          Returns the whether Opera should quit when OperaRunner is shut down.
 Integer getPort()
          Returns the port Opera should connect to.
 OperaProduct getProduct()
          Returns the product currently used, for example desktop or core.
 String getProfile()
          Sets the directory to use for the Opera profile.
 void setArguments(OperaArguments arguments)
          Specifies what arguments to pass on to Opera.
 void setBinary(File binary)
           
 void setBinary(String path)
          Sets Opera's location.
 void setDisplay(Integer display)
          Sets the X display to use.
 void setHost(String host)
          The host Opera should connect to.
 void setLoggingLevel(Level level)
          Specifies the logging level of the started Opera process and the process handling mechanism.
 void setNoQuit(boolean noQuit)
          Specifies whether Opera should keep running after OperaRunner is shut down.
 void setPort(Integer port)
          Specifies the port Opera should connect to.
 void setProduct(OperaProduct product)
          Sets the product currently used, for example desktop or core.
 void setProfile(String profile)
          Returns the path to the directory to use for the Opera profile.
 boolean supportsDebugProxy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operaBinary

protected File operaBinary

display

protected Integer display

product

protected OperaProduct product

profile

protected String profile

noQuit

protected boolean noQuit

host

protected String host

port

protected Integer port

loggingLevel

protected Level loggingLevel

arguments

protected OperaArguments arguments
Constructor Detail

OperaRunnerSettings

public OperaRunnerSettings()
Method Detail

getBinary

public File getBinary()
Description copied from interface: OperaRunnerSettings
Returns the full path to the browser binary.

Specified by:
getBinary in interface OperaRunnerSettings
Returns:
the absolute path to Opera's binary

setBinary

public void setBinary(String path)
Description copied from interface: OperaRunnerSettings
Sets Opera's location.

Specified by:
setBinary in interface OperaRunnerSettings
Parameters:
path - the absolute path to the Opera binary

setBinary

public void setBinary(File binary)

getDisplay

public Integer getDisplay()
Description copied from interface: OperaRunnerSettings
Gets the X display. Only works on *nix operating systems.

Specified by:
getDisplay in interface OperaRunnerSettings
Returns:
the X display

setDisplay

public void setDisplay(Integer display)
                throws UnsupportedOperationException
Description copied from interface: OperaRunnerSettings
Sets the X display to use. Only works on *nix operating systems.

Specified by:
setDisplay in interface OperaRunnerSettings
Parameters:
display - the X display to use
Throws:
UnsupportedOperationException - if on a non-nix operating system

getProduct

public OperaProduct getProduct()
Description copied from interface: OperaRunnerSettings
Returns the product currently used, for example desktop or core.

Specified by:
getProduct in interface OperaRunnerSettings
Returns:
the profile configuration set

setProduct

public void setProduct(OperaProduct product)
Description copied from interface: OperaRunnerSettings
Sets the product currently used, for example desktop or core.

Specified by:
setProduct in interface OperaRunnerSettings
Parameters:
product - the profile configuration to use

getProfile

public String getProfile()
Description copied from interface: OperaRunnerSettings
Sets the directory to use for the Opera profile. If null, generate a temporary directory. If not empty use the given directory. To not create a temporary directory for backwards compatibility reasons, set it to an empty string (""), such as for Opera < 12.

Specified by:
getProfile in interface OperaRunnerSettings
Returns:
the absolute path to the profile directory

setProfile

public void setProfile(String profile)
Description copied from interface: OperaRunnerSettings
Returns the path to the directory to use for the Opera profile. If null a random temporary directory is used. If "", an empty string, then the default autotest profile directory is used.

Specified by:
setProfile in interface OperaRunnerSettings
Parameters:
profile - the absolute path to the profile directory

getNoQuit

public boolean getNoQuit()
Description copied from interface: OperaRunnerSettings
Returns the whether Opera should quit when OperaRunner is shut down. If enabled, it will keep the browser running after the runner is shut down.

Specified by:
getNoQuit in interface OperaRunnerSettings
Returns:
true if browser should keep running, false otherwise

setNoQuit

public void setNoQuit(boolean noQuit)
Description copied from interface: OperaRunnerSettings
Specifies whether Opera should keep running after OperaRunner is shut down. If enabled, it will keep the browser running after the runner is shut down.

Specified by:
setNoQuit in interface OperaRunnerSettings
Parameters:
noQuit - true if browser should keep running, false otherwise

getHost

public String getHost()
Description copied from interface: OperaRunnerSettings
The host Opera should connect to. 0 = Random -1 = Opera default (for use with Opera < 12)

Specified by:
getHost in interface OperaRunnerSettings
Returns:
the host Opera should connect to

setHost

public void setHost(String host)
Description copied from interface: OperaRunnerSettings
The host Opera should connect to. 0 = Random -1 = Opera default (for use with Opera < 12)

Specified by:
setHost in interface OperaRunnerSettings
Parameters:
host - the host Opera should connect to

getPort

public Integer getPort()
Description copied from interface: OperaRunnerSettings
Returns the port Opera should connect to. 0 = Random, -1 = Opera default (for use with Opera < 12).

Specified by:
getPort in interface OperaRunnerSettings
Returns:
the port Opera should connect to

setPort

public void setPort(Integer port)
Description copied from interface: OperaRunnerSettings
Specifies the port Opera should connect to. 0 = Random, -1 = Opera default (for use with Opera < 12).

Specified by:
setPort in interface OperaRunnerSettings
Parameters:
port - the port Opera should connect to

supportsDebugProxy

public boolean supportsDebugProxy()

getArguments

public OperaArguments getArguments()
Description copied from interface: OperaRunnerSettings
Gets the arguments passed on to Opera.

Specified by:
getArguments in interface OperaRunnerSettings
Returns:
the arguments passed on to Opera

setArguments

public void setArguments(OperaArguments arguments)
Description copied from interface: OperaRunnerSettings
Specifies what arguments to pass on to Opera.

Specified by:
setArguments in interface OperaRunnerSettings
Parameters:
arguments - which arguments to pass on to Opera

getLoggingLevel

public Level getLoggingLevel()
Description copied from interface: OperaRunnerSettings
Returns the logging level of the started Opera process and the process handling mechanism.

Specified by:
getLoggingLevel in interface OperaRunnerSettings
Returns:
the logging level

setLoggingLevel

public void setLoggingLevel(Level level)
Description copied from interface: OperaRunnerSettings
Specifies the logging level of the started Opera process and the process handling mechanism.

Specified by:
setLoggingLevel in interface OperaRunnerSettings
Parameters:
level - the logging level to use

getDefaultSettings

public static OperaRunnerSettings getDefaultSettings()


Copyright © 2011. All Rights Reserved.