|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opera.core.systems.ScopeServices
public class ScopeServices
Implements the interface to the Scope protocol.
| Constructor Summary | |
|---|---|
ScopeServices(Map<String,String> requiredServices,
int port,
boolean manualConnect)
Creates the Scope server on specified address and port, as well as enabling the required Scope services. |
|
| Method Summary | |
|---|---|
void |
captureOperaIdle()
Enables the capturing on OperaIdle events. |
void |
close()
Close the connection and cleanup the channel |
void |
enableServices(List<String> requiredServices)
|
UmsProtos.Response |
executeCommand(ICommand command,
com.google.protobuf.AbstractMessage.Builder<?> builder)
Sends a command and wait for the response. |
UmsProtos.Response |
executeCommand(ICommand command,
com.google.protobuf.AbstractMessage.Builder<?> builder,
long timeout)
|
StpConnection |
getConnection()
|
ICookieManager |
getCookieManager()
|
ICoreUtils |
getCoreUtils()
|
IEcmaScriptDebugger |
getDebugger()
|
IDesktopUtils |
getDesktopUtils()
|
IDesktopWindowManager |
getDesktopWindowManager()
|
IOperaExec |
getExec()
|
List<String> |
getListedServices()
|
String |
getMinVersionFor(String service)
Gets the minimum version for this service, as provided by OperaDriver in the constructor. |
IPrefs |
getPrefs()
|
ISelftest |
getSelftest()
|
SystemInputManager |
getSystemInputManager()
|
Map<String,String> |
getVersions()
|
IWindowManager |
getWindowManager()
|
void |
init()
Gets the supported services from Opera and calls methods to enable the ones we requested. |
boolean |
isOperaIdleAvailable()
|
boolean |
onConnected(StpConnection con)
This event is emitted if the STP connection thread has accepted a connection. |
void |
onDesktopWindowActivated(DesktopWmProtos.DesktopWindowInfo info)
|
void |
onDesktopWindowClosed(DesktopWmProtos.DesktopWindowInfo info)
|
void |
onDesktopWindowLoaded(DesktopWmProtos.DesktopWindowInfo info)
|
void |
onDesktopWindowShown(DesktopWmProtos.DesktopWindowInfo info)
|
void |
onDesktopWindowUpdated(DesktopWmProtos.DesktopWindowInfo info)
|
void |
onDisconnect()
This event is triggered whenever the STP connection is closed. |
void |
onException(Exception exception)
This event is triggered if an exception is thrown on the STP connection thread. |
void |
onHandshake(boolean stp1)
This event is triggered when we have received a response to StpConnection.sendEnableStp1(). |
void |
onOperaIdle()
|
void |
onQuickMenuClosed(DesktopWmProtos.QuickMenuID id)
|
void |
onQuickMenuItemPressed(DesktopWmProtos.QuickMenuItemID menuItemID)
|
void |
onQuickMenuShown(DesktopWmProtos.QuickMenuInfo info)
|
void |
onRequest(int windowId)
|
void |
onResponseReceived(int tag,
UmsProtos.Response response)
This event is triggered whenever a command error response is received. |
void |
onSelftestDone()
|
void |
onSelftestOutput(SelftestProtos.SelftestOutput output)
|
void |
onServiceList(List<String> services)
This event is triggered upon receiving an initial service list from Opera. |
void |
onWindowClosed(int id)
|
void |
onWindowLoaded(int id)
|
void |
quit()
|
void |
quit(OperaRunner runner,
int pid)
|
void |
quitOpera(OperaRunner runner,
int pid)
|
String |
selftest(List<String> modules,
long timeout)
|
void |
setCookieManager(ICookieManager cookieManager)
|
void |
setCoreUtils(ICoreUtils coreUtils)
|
void |
setDebugger(IEcmaScriptDebugger debugger)
|
void |
setDesktopUtils(IDesktopUtils desktopUtils)
|
void |
setDesktopWindowManager(IDesktopWindowManager desktopWindowManager)
|
void |
setExec(IOperaExec exec)
|
void |
setListedServices(List<String> services)
|
void |
setPrefs(IPrefs prefs)
|
void |
setSelftest(ISelftest selftest)
|
void |
setSystemInputManager(SystemInputManager manager)
|
void |
setWindowManager(IWindowManager windowManager)
|
void |
shutdown()
|
void |
startStpThread()
|
int |
waitForDesktopWindowActivated(String windowName,
long timeout)
|
int |
waitForDesktopWindowClosed(String windowName,
long timeout)
|
int |
waitForDesktopWindowLoaded(String windowName,
long timeout)
|
int |
waitForDesktopWindowShown(String windowName,
long timeout)
|
int |
waitForDesktopWindowUpdated(String windowName,
long timeout)
|
String |
waitForMenuClosed(String menuName,
long timeout)
|
String |
waitForMenuItemPressed(String menuItemText,
long timeout)
|
String |
waitForMenuShown(String menuName,
long timeout)
|
void |
waitForOperaIdle(long timeout)
Waits for an OperaIdle event before continuing. |
void |
waitForWindowLoaded(int activeWindowId,
long timeout)
|
void |
waitStart()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScopeServices(Map<String,String> requiredServices,
int port,
boolean manualConnect)
throws IOException
requiredServices - list of required services and their minimum required versionport - the port on which to start the Scope servermanualConnect - whether to output ready message with port number when starting
IOException - if an I/O error occurs| Method Detail |
|---|
public void init()
public void shutdown()
public void enableServices(List<String> requiredServices)
public void quitOpera(OperaRunner runner,
int pid)
public void quit()
public void quit(OperaRunner runner,
int pid)
public boolean onConnected(StpConnection con)
IConnectionHandler
onConnected in interface IConnectionHandlercon - the connection that has been accepted
public void onServiceList(List<String> services)
IConnectionHandler
onServiceList in interface IConnectionHandlerservices - the list of services available in the connected Opera instancepublic void onWindowLoaded(int id)
public void onWindowClosed(int id)
public void onDesktopWindowShown(DesktopWmProtos.DesktopWindowInfo info)
public void onDesktopWindowUpdated(DesktopWmProtos.DesktopWindowInfo info)
public void onDesktopWindowClosed(DesktopWmProtos.DesktopWindowInfo info)
public void onDesktopWindowActivated(DesktopWmProtos.DesktopWindowInfo info)
public void onDesktopWindowLoaded(DesktopWmProtos.DesktopWindowInfo info)
public void onQuickMenuShown(DesktopWmProtos.QuickMenuInfo info)
public void onQuickMenuItemPressed(DesktopWmProtos.QuickMenuItemID menuItemID)
public void onQuickMenuClosed(DesktopWmProtos.QuickMenuID id)
public void onHandshake(boolean stp1)
IConnectionHandlerStpConnection.sendEnableStp1().
onHandshake in interface IConnectionHandlerstp1 - true if handshake was an STP/1 responsepublic void onDisconnect()
IConnectionHandler
onDisconnect in interface IConnectionHandlerpublic void onOperaIdle()
public void onSelftestOutput(SelftestProtos.SelftestOutput output)
public void onSelftestDone()
public String selftest(List<String> modules,
long timeout)
public void waitForWindowLoaded(int activeWindowId,
long timeout)
public boolean isOperaIdleAvailable()
public void captureOperaIdle()
public void waitForOperaIdle(long timeout)
timeout - Time in milliseconds to wait before abortingpublic void waitStart()
public int waitForDesktopWindowLoaded(String windowName,
long timeout)
public int waitForDesktopWindowShown(String windowName,
long timeout)
public int waitForDesktopWindowUpdated(String windowName,
long timeout)
public int waitForDesktopWindowActivated(String windowName,
long timeout)
public int waitForDesktopWindowClosed(String windowName,
long timeout)
public String waitForMenuShown(String menuName,
long timeout)
public String waitForMenuClosed(String menuName,
long timeout)
public String waitForMenuItemPressed(String menuItemText,
long timeout)
public void onResponseReceived(int tag,
UmsProtos.Response response)
IConnectionHandler
onResponseReceived in interface IConnectionHandlertag - the internal command tag corresponding to the requestresponse - the response, or null if the response was an errorpublic void onException(Exception exception)
IConnectionHandler
onException in interface IConnectionHandlerexception - the exception thrown on the STP connection threadpublic String getMinVersionFor(String service)
public void setListedServices(List<String> services)
public List<String> getListedServices()
public void close()
public UmsProtos.Response executeCommand(ICommand command,
com.google.protobuf.AbstractMessage.Builder<?> builder)
public UmsProtos.Response executeCommand(ICommand command,
com.google.protobuf.AbstractMessage.Builder<?> builder,
long timeout)
public void startStpThread()
public void onRequest(int windowId)
public Map<String,String> getVersions()
public StpConnection getConnection()
public IEcmaScriptDebugger getDebugger()
public void setDebugger(IEcmaScriptDebugger debugger)
public IOperaExec getExec()
public void setExec(IOperaExec exec)
public IWindowManager getWindowManager()
public void setWindowManager(IWindowManager windowManager)
public ICoreUtils getCoreUtils()
public void setCoreUtils(ICoreUtils coreUtils)
public IPrefs getPrefs()
public void setPrefs(IPrefs prefs)
public IDesktopWindowManager getDesktopWindowManager()
public void setDesktopWindowManager(IDesktopWindowManager desktopWindowManager)
public IDesktopUtils getDesktopUtils()
public void setDesktopUtils(IDesktopUtils desktopUtils)
public SystemInputManager getSystemInputManager()
public void setSystemInputManager(SystemInputManager manager)
public ICookieManager getCookieManager()
public void setCookieManager(ICookieManager cookieManager)
public ISelftest getSelftest()
public void setSelftest(ISelftest selftest)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||