
com.infotel.seleniumrobot.grid.servlets.client.NodeStatusServletClientFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of seleniumRobot-grid4 Show documentation
Show all versions of seleniumRobot-grid4 Show documentation
Selenium grid extension for mobile testing
The newest version!
package com.infotel.seleniumrobot.grid.servlets.client;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
public class NodeStatusServletClientFactory {
Class extends INodeStatusServletClient> clientClass;
public NodeStatusServletClientFactory() {
clientClass = NodeStatusServletClient.class;
}
public NodeStatusServletClientFactory(Class extends INodeStatusServletClient> clientClass) {
this.clientClass = clientClass;
}
public INodeStatusServletClient createNodeStatusServletClient(URL nodeUrl) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
return clientClass.getDeclaredConstructor(String.class, Integer.class).newInstance(nodeUrl.getHost(), nodeUrl.getPort());
}
public INodeStatusServletClient createNodeStatusServletClient(String host, int port) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
return clientClass.getDeclaredConstructor(String.class, Integer.class).newInstance(host, port);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy