public class FrameGroupCommandQueueSet extends Object
Manages sets of CommandQueues corresponding to windows and frames in a single browser session.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LOCAL_FRAME_ADDRESS |
static String |
DEFAULT_SELENIUM_WINDOW_NAME
Each user-visible window group has a selenium window name.
|
Constructor and Description |
---|
FrameGroupCommandQueueSet(String sessionId,
int portDriversShouldContact,
RemoteControlConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
protected void |
addTemporaryFile(File tf) |
static void |
clearQueueSet(String sessionId)
Deletes the specified FrameGroupCommandQueueSet
|
String |
doCommand(String command,
String arg,
String value)
Schedules the specified command to be retrieved by the next call to handle command result, and
returns the result of that command.
|
void |
endOfLife()
Empty queues, and thereby wake up any threads that are hanging around.
|
CommandQueue |
getCommandQueue() |
CommandQueue |
getCommandQueue(String uniqueId) |
String |
getExtensionJs() |
static FrameGroupCommandQueueSet |
getQueueSet(String sessionId)
Retrieves a FrameGroupCommandQueueSet for the specified sessionId
|
protected int |
getSpeed()
Returns the delay for this frame group's command queues
|
String |
getStringArrayAccessorCSV(String[] stringArray)
Generates a CSV string from the given string array.
|
RemoteCommand |
handleCommandResult(String commandResult,
FrameAddress incomingFrameAddress,
String uniqueId,
boolean justLoaded,
List<?> jsWindowNameVars)
Accepts a command reply, and retrieves the next command to run.
|
static FrameAddress |
makeFrameAddress(String seleniumWindowName,
String localFrameAddress) |
static FrameGroupCommandQueueSet |
makeQueueSet(String sessionId,
int portDriversShouldContact,
RemoteControlConfiguration configuration)
Creates a FrameGroupCommandQueueSet for the specifed sessionId
|
protected void |
removeTemporaryFiles() |
void |
reset(String baseUrl) |
void |
setExtensionJs(String extensionJs) |
protected void |
setSpeed(int i)
Sets this frame group's speed, and updates all command queues to use this speed.
|
protected static void |
sleepForAtLeast(long ms) |
String |
waitForLoad(long timeoutInMilliseconds) |
protected static boolean |
waitUntilSignalOrNumSecondsPassed(Condition condition,
int numSeconds)
Waits on the condition, making sure to wait at least as many seconds as specified, unless the
condition is signaled first.
|
public static final String DEFAULT_LOCAL_FRAME_ADDRESS
public static final String DEFAULT_SELENIUM_WINDOW_NAME
public FrameGroupCommandQueueSet(String sessionId, int portDriversShouldContact, RemoteControlConfiguration configuration)
public CommandQueue getCommandQueue()
public static FrameGroupCommandQueueSet getQueueSet(String sessionId)
public static FrameGroupCommandQueueSet makeQueueSet(String sessionId, int portDriversShouldContact, RemoteControlConfiguration configuration)
public static void clearQueueSet(String sessionId)
public CommandQueue getCommandQueue(String uniqueId)
protected void setSpeed(int i)
i
- millisecond delay between queue operationsprotected int getSpeed()
public String doCommand(String command, String arg, String value) throws RemoteCommandException
command
- - the remote command verbarg
- - the first remote argument (meaning depends on the verb)value
- - the second remote argumentRemoteCommandException
- if a waitForLoad failed.public String getStringArrayAccessorCSV(String[] stringArray)
stringArray
- Array of strings to generate a CSV.public String waitForLoad(long timeoutInMilliseconds) throws RemoteCommandException
RemoteCommandException
protected static boolean waitUntilSignalOrNumSecondsPassed(Condition condition, int numSeconds)
condition
- numSeconds
- protected static void sleepForAtLeast(long ms)
public RemoteCommand handleCommandResult(String commandResult, FrameAddress incomingFrameAddress, String uniqueId, boolean justLoaded, List<?> jsWindowNameVars)
Accepts a command reply, and retrieves the next command to run.
commandResult
- - the reply from the previous command, or nullincomingFrameAddress
- - frame from which the reply cameuniqueId
- justLoaded
- jsWindowNameVars
- public void endOfLife()
Empty queues, and thereby wake up any threads that are hanging around.
public static FrameAddress makeFrameAddress(String seleniumWindowName, String localFrameAddress)
public void reset(String baseUrl)
protected void removeTemporaryFiles()
protected void addTemporaryFile(File tf)
public void setExtensionJs(String extensionJs)
public String getExtensionJs()
Copyright © 2013. All Rights Reserved.