org.openqa.grid.common
Class RegistrationRequest

java.lang.Object
  extended by org.openqa.grid.common.RegistrationRequest

public class RegistrationRequest
extends Object

helper to register to the grid. Using JSON to exchange the object between the node and grid.


Field Summary
static String APP
           
static String AUTO_REGISTER
           
static String BROWSER
           
static String CLEAN_SNAPSHOT
           
static String CLEAN_UP_CYCLE
           
static String MAX_INSTANCES
           
static String MAX_SESSION
           
static String MAX_TESTS_BEFORE_CLEAN
           
static String PLATFORM
           
static String PROXY_CLASS
           
static String REMOTE_URL
           
static String TIME_OUT
           
static String VERSION
           
 
Constructor Summary
RegistrationRequest()
           
 
Method Summary
 void addDesiredCapabilitiy(Map<String,?> c)
           
 org.json.JSONObject getAssociatedJSON()
           
 List<Map<String,Object>> getCapabilities()
           
 int getConfigAsInt(String param, int defaultValue)
           
 String getConfigAsString(String param)
           
 Map<String,Object> getConfiguration()
           
 String getDescription()
           
 String getId()
           
 String getName()
           
static RegistrationRequest getNewInstance(String json)
          Create an object from a registration request formatted as a json string.
 String getRemoteProxyClass()
          if a PROXY_CLASS is specified in the request, the proxy created following this request will be of that type.
 void setCapabilities(List<Map<String,Object>> capabilities)
           
 void setConfiguration(Map<String,Object> configuration)
           
 void setDescription(String description)
           
 void setId(String id)
           
 void setName(String name)
           
 String toJSON()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP

public static final String APP
See Also:
Constant Field Values

MAX_INSTANCES

public static final String MAX_INSTANCES
See Also:
Constant Field Values

BROWSER

public static final String BROWSER
See Also:
Constant Field Values

PLATFORM

public static final String PLATFORM
See Also:
Constant Field Values

VERSION

public static final String VERSION
See Also:
Constant Field Values

PROXY_CLASS

public static final String PROXY_CLASS
See Also:
Constant Field Values

CLEAN_UP_CYCLE

public static final String CLEAN_UP_CYCLE
See Also:
Constant Field Values

TIME_OUT

public static final String TIME_OUT
See Also:
Constant Field Values

REMOTE_URL

public static final String REMOTE_URL
See Also:
Constant Field Values

MAX_SESSION

public static final String MAX_SESSION
See Also:
Constant Field Values

AUTO_REGISTER

public static final String AUTO_REGISTER
See Also:
Constant Field Values

MAX_TESTS_BEFORE_CLEAN

public static final String MAX_TESTS_BEFORE_CLEAN
See Also:
Constant Field Values

CLEAN_SNAPSHOT

public static final String CLEAN_SNAPSHOT
See Also:
Constant Field Values
Constructor Detail

RegistrationRequest

public RegistrationRequest()
Method Detail

getId

public String getId()

setId

public void setId(String id)

getName

public String getName()

setName

public void setName(String name)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getCapabilities

public List<Map<String,Object>> getCapabilities()

addDesiredCapabilitiy

public void addDesiredCapabilitiy(Map<String,?> c)

setCapabilities

public void setCapabilities(List<Map<String,Object>> capabilities)

getConfiguration

public Map<String,Object> getConfiguration()

setConfiguration

public void setConfiguration(Map<String,Object> configuration)

toJSON

public String toJSON()

getAssociatedJSON

public org.json.JSONObject getAssociatedJSON()

getConfigAsString

public String getConfigAsString(String param)

getConfigAsInt

public int getConfigAsInt(String param,
                          int defaultValue)

getNewInstance

public static RegistrationRequest getNewInstance(String json)
Create an object from a registration request formatted as a json string.

Parameters:
json -
Returns:
create a request from the JSON request received.

getRemoteProxyClass

public String getRemoteProxyClass()
if a PROXY_CLASS is specified in the request, the proxy created following this request will be of that type. If nothing is specified, it will use RemoteProxy

Returns:
null if no class was specified.


Copyright © 2011. All Rights Reserved.