本文整理汇总了Java中org.openqa.grid.common.RegistrationRequest.getConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java RegistrationRequest.getConfiguration方法的具体用法?Java RegistrationRequest.getConfiguration怎么用?Java RegistrationRequest.getConfiguration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openqa.grid.common.RegistrationRequest
的用法示例。
在下文中一共展示了RegistrationRequest.getConfiguration方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveNodeSettings
import org.openqa.grid.common.RegistrationRequest; //导入方法依赖的package包/类
/**
* Resolve Selenium Grid node settings for host, port, and hub.
*
* @param nodeConfig node configuration with unresolved settings
* @return node configuration with resolved settings
*/
private RegistrationRequest resolveNodeSettings(RegistrationRequest nodeConfig) {
Map<String, Object> config = nodeConfig.getConfiguration();
String nodeHost = getString(SeleniumSettings.NODE_HOST.key());
if (nodeHost != null) {
config.put("host", nodeHost);
}
if (config.get("host") == null) {
config.put("host", getLocalHost());
}
config.put("port", getInteger(SeleniumSettings.NODE_PORT.key(), DEFAULT_NODE_PORT));
config.put("hub", "http://" + getHubConfig().getHost() + ":" + getHubConfig().getPort() + "/grid/register/");
return nodeConfig;
}
示例2: MonitoringWebProxy
import org.openqa.grid.common.RegistrationRequest; //导入方法依赖的package包/类
public MonitoringWebProxy(RegistrationRequest request, Registry registry) {
super(request, registry);
final String addr = request.getConfiguration().host;
remoteHostName = addr.toLowerCase();
try {
remoteHostName = InetAddress.getByName(addr).getCanonicalHostName().toLowerCase();
} catch (Exception e) {
LOG.info(format("Unable to lookup name for remote address '%s", addr));
}
LOG.info(String.format("Initializing monitoring WebProxy for %s: %s.", remoteHostName, request.toJson()));
nodeReporter = EXECUTOR.scheduleAtFixedRate(new NodeReporter(remoteHostName, INFLUX_DB, DATABASE, this), 0, 5, TimeUnit.SECONDS);
}
示例3: getNodeHost
import org.openqa.grid.common.RegistrationRequest; //导入方法依赖的package包/类
/**
* Get an {@link HttpHost} object for the configured Selenium Grid node.
*
* @param nodeConfig node configuration object
* @return HttpHost object for configured node
*/
static HttpHost getNodeHost(RegistrationRequest nodeConfig) {
Map<String, Object> config = nodeConfig.getConfiguration();
return new HttpHost((String) config.get("host"), (Integer) config.get("port"));
}