当前位置: 首页>>代码示例>>Java>>正文


Java RegistrationRequest.getConfiguration方法代码示例

本文整理汇总了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;
}
 
开发者ID:Nordstrom,项目名称:Selenium-Foundation,代码行数:23,代码来源:SeleniumConfig.java

示例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);
}
 
开发者ID:jabbrwcky,项目名称:selenium-api,代码行数:16,代码来源:MonitoringWebProxy.java

示例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"));
}
 
开发者ID:Nordstrom,项目名称:Selenium-Foundation,代码行数:11,代码来源:GridUtility.java


注:本文中的org.openqa.grid.common.RegistrationRequest.getConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。