com.opera.core.systems
Class WaitState
java.lang.Object
com.opera.core.systems.WaitState
public class WaitState
- extends Object
This class handles a queue of events to be handled from multiple threads. One thread can wait for
events to happen while other threads can post these events by calling the on{Event} handlers.
- Author:
- Jan Vidar Krey
|
Method Summary |
void |
captureOperaIdle()
Enables the capturing on OperaIdle events. |
void |
onRequest(int windowId)
|
void |
setWaitEvents(boolean wait_events)
|
UmsProtos.Response |
waitFor(int tag,
long timeout)
|
int |
waitForDesktopWindowActivated(String win_name,
long timeout)
|
int |
waitForDesktopWindowClosed(String win_name,
long timeout)
|
int |
waitForDesktopWindowLoaded(String win_name,
long timeout)
|
int |
waitForDesktopWindowShown(String win_name,
long timeout)
|
int |
waitForDesktopWindowUpdated(String win_name,
long timeout)
|
void |
waitForHandshake(long value)
|
void |
waitForOperaIdle(long timeout)
Waits for an OperaIdle event before continuing. |
String |
waitForQuickMenuClosed(String menuName,
long timeout)
|
String |
waitForQuickMenuItemPressed(String menuItemText,
long timeout)
|
String |
waitForQuickMenuShown(String menuName,
long timeout)
|
String |
waitForSelftestDone(long timeout)
|
void |
waitForWindowLoaded(int windowId,
long timeout)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WaitState
public WaitState()
setWaitEvents
public void setWaitEvents(boolean wait_events)
onRequest
public void onRequest(int windowId)
waitForHandshake
public void waitForHandshake(long value)
waitForWindowLoaded
public void waitForWindowLoaded(int windowId,
long timeout)
captureOperaIdle
public void captureOperaIdle()
- Enables the capturing on OperaIdle events. Sometimes when executing a command OperaIdle
events will fire before the response is received for the sent command. This results in missing
the Idle events, and later probably hitting a timeout. To prevent this you can call this
method which will enable the tracking of any Idle events received between now and when you call
waitForOperaIdle(). If Idle events have been received then waitForOperaIdle() will return
immediately.
waitForOperaIdle
public void waitForOperaIdle(long timeout)
- Waits for an OperaIdle event before continuing. If captureOperaIdle() has been called
since the last call of waitForOperaIdle(), and one or more OperaIdle events have occurred then
this method will return immediately. After calling this method the capturing of OperaIdle
events is disabled until the next call of captureOperaIdle()
- Parameters:
timeout - time in milliseconds to wait before aborting
waitFor
public UmsProtos.Response waitFor(int tag,
long timeout)
waitForDesktopWindowShown
public int waitForDesktopWindowShown(String win_name,
long timeout)
waitForDesktopWindowUpdated
public int waitForDesktopWindowUpdated(String win_name,
long timeout)
waitForDesktopWindowActivated
public int waitForDesktopWindowActivated(String win_name,
long timeout)
waitForDesktopWindowClosed
public int waitForDesktopWindowClosed(String win_name,
long timeout)
waitForDesktopWindowLoaded
public int waitForDesktopWindowLoaded(String win_name,
long timeout)
waitForQuickMenuShown
public String waitForQuickMenuShown(String menuName,
long timeout)
waitForQuickMenuClosed
public String waitForQuickMenuClosed(String menuName,
long timeout)
waitForQuickMenuItemPressed
public String waitForQuickMenuItemPressed(String menuItemText,
long timeout)
waitForSelftestDone
public String waitForSelftestDone(long timeout)
Copyright © 2012. All Rights Reserved.