public class CommandQueue extends Object
Schedules and coordinates commands to be run.
Constructor and Description |
---|
CommandQueue(String newSessionId,
String newUniqueId,
int opDelay,
RemoteControlConfiguration configuration) |
CommandQueue(String newSessionId,
String newUniqueId,
RemoteControlConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addJsWindowNameVar(String jsWindowNameVar) |
void |
declareClosed() |
String |
doCommand(String command,
String field,
String value)
Sends the specified command (to be retrieved by the next call to handle command result), and
returns the result of that command.
|
protected void |
doCommandWithoutWaitingForAResponse(String command,
String field,
String value) |
void |
endOfLife()
clear the contents of the threads, and unblocks polling threads
|
BrowserResponseSequencer |
getBrowserResponseSequencer() |
FrameAddress |
getFrameAddress() |
protected static String |
getIdentification(String caller,
String queueId) |
protected RemoteCommand |
getNextCommand()
Get, and remove from the command holder, the next command to run
|
int |
getQueueDelay() |
protected String |
getResult()
Get, and remove from the command holder, the next command to run
|
static int |
getSpeed() |
RemoteCommand |
handleCommandResult(String commandResult)
Accepts a command reply, and retrieves the next command to run.
|
protected void |
handleCommandResultWithoutWaitingForACommand(String commandResult) |
boolean |
isClosed() |
boolean |
isResultExpected()
Get whether this command queue expects a result instead of just "OK".
|
boolean |
isWindowPointedToByJsVariable(String jsVariableName) |
protected RemoteCommand |
peekAtCommand() |
protected String |
peekAtResult() |
protected boolean |
putCommand(RemoteCommand cmd) |
protected boolean |
putResult(String result) |
void |
setFrameAddress(FrameAddress frameAddress) |
void |
setQueueDelay(int i) |
protected void |
setResultExpected(boolean resultExpected) |
static void |
setSpeed(int i) |
String |
toString() |
public CommandQueue(String newSessionId, String newUniqueId, RemoteControlConfiguration configuration)
public CommandQueue(String newSessionId, String newUniqueId, int opDelay, RemoteControlConfiguration configuration)
public String doCommand(String command, String field, String value)
command
- - the remote command verbfield
- - the first remote argument (meaning depends on the verb)value
- - the second remote argumentprotected void doCommandWithoutWaitingForAResponse(String command, String field, String value) throws WindowClosedException
WindowClosedException
protected String getResult()
public RemoteCommand handleCommandResult(String commandResult)
Accepts a command reply, and retrieves the next command to run.
commandResult
- - the reply from the previous command, or nullprotected void handleCommandResultWithoutWaitingForACommand(String commandResult)
protected RemoteCommand getNextCommand()
public void endOfLife()
public FrameAddress getFrameAddress()
public void setFrameAddress(FrameAddress frameAddress)
public boolean isResultExpected()
public void setQueueDelay(int i)
public int getQueueDelay()
public static void setSpeed(int i)
public static int getSpeed()
public boolean isWindowPointedToByJsVariable(String jsVariableName)
public void addJsWindowNameVar(String jsWindowNameVar)
public void declareClosed()
public boolean isClosed()
public BrowserResponseSequencer getBrowserResponseSequencer()
protected void setResultExpected(boolean resultExpected)
protected String peekAtResult()
protected RemoteCommand peekAtCommand()
protected boolean putResult(String result)
protected boolean putCommand(RemoteCommand cmd)
Copyright © 2014. All rights reserved.