com.opera.core.systems.runner.interfaces
Interface OperaRunnerSettings

All Known Implementing Classes:
OperaLauncherRunnerSettings, OperaRunnerSettings

public interface OperaRunnerSettings

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

Author:
Andreas Tolf Tolfsen

Method Summary
 OperaArguments getArguments()
          Gets the arguments passed on to Opera.
 File getBinary()
          Returns the full path to the browser binary.
 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.
 OperaProfile getProfile()
          Returns an OperaProfile object containing all settings related to the Opera profile to be used.
 void setArguments(OperaArguments arguments)
          Specifies what arguments to pass on to Opera.
 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(OperaProfile profile)
          Sets the profile to use as an Opera profile represented as an object.
 void setProfile(String profile)
          Sets the directory to use for the Opera profile.
 boolean supportsDebugProxy()
          Whether or not the currently specified Opera configuration supports the -debugproxy command-line argument.
 boolean supportsPd()
          Whether or not the currently specified Opera configuration supports the -pd command-line argument.
 

Method Detail

getBinary

File getBinary()
Returns the full path to the browser binary.

Returns:
the absolute path to Opera's binary

setBinary

void setBinary(String path)
Sets Opera's location.

Parameters:
path - the absolute path to the Opera binary

getDisplay

Integer getDisplay()
Gets the X display. Only works on *nix operating systems.

Returns:
the X display

setDisplay

void setDisplay(Integer display)
                throws UnsupportedOperationException
Sets the X display to use. Only works on *nix operating systems.

Parameters:
display - the X display to use
Throws:
UnsupportedOperationException - if on a non-nix operating system

getProduct

OperaProduct getProduct()
Returns the product currently used, for example desktop or core.

Returns:
the profile configuration set

setProduct

void setProduct(OperaProduct product)
Sets the product currently used, for example desktop or core.

Parameters:
product - the profile configuration to use

getProfile

OperaProfile getProfile()
Returns an OperaProfile object containing all settings related to the Opera profile to be used. This might be anything from the path to the profile directory, to preferences used in Opera.

Returns:
Opera's currently used profile

setProfile

void setProfile(String profile)
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.

Parameters:
profile - the absolute path to the profile directory

setProfile

void setProfile(OperaProfile profile)
Sets the profile to use as an Opera profile represented as an object.

Parameters:
profile - the Opera profile to use

getNoQuit

boolean getNoQuit()
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.

Returns:
true if browser should keep running, false otherwise

setNoQuit

void setNoQuit(boolean noQuit)
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.

Parameters:
noQuit - true if browser should keep running, false otherwise

getHost

String getHost()
The host Opera should connect to. 0 = Random -1 = Opera default (for use with Opera < 12)

Returns:
the host Opera should connect to

setHost

void setHost(String host)
The host Opera should connect to. 0 = Random -1 = Opera default (for use with Opera < 12)

Parameters:
host - the host Opera should connect to

getPort

Integer getPort()
Returns the port Opera should connect to. 0 = Random, -1 = Opera default (for use with Opera < 12).

Returns:
the port Opera should connect to

setPort

void setPort(Integer port)
Specifies the port Opera should connect to. 0 = Random, -1 = Opera default (for use with Opera < 12).

Parameters:
port - the port Opera should connect to

supportsDebugProxy

boolean supportsDebugProxy()
Whether or not the currently specified Opera configuration supports the -debugproxy command-line argument. If the specified port is not equal to the default proxy server port specified in OperaIntervals.SERVER_PORT, this will be true.

Returns:
true if this configuration supports the -debugproxy command-line argument, false otherwise

supportsPd

boolean supportsPd()
Whether or not the currently specified Opera configuration supports the -pd command-line argument.

Returns:
true if this configuration supports the -pd command-line argument.

getArguments

OperaArguments getArguments()
Gets the arguments passed on to Opera.

Returns:
the arguments passed on to Opera

setArguments

void setArguments(OperaArguments arguments)
Specifies what arguments to pass on to Opera.

Parameters:
arguments - which arguments to pass on to Opera

getLoggingLevel

Level getLoggingLevel()
Returns the logging level of the started Opera process and the process handling mechanism.

Returns:
the logging level

setLoggingLevel

void setLoggingLevel(Level level)
Specifies the logging level of the started Opera process and the process handling mechanism.

Parameters:
level - the logging level to use


Copyright © 2012. All Rights Reserved.