All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infotel.seleniumrobot.grid.servlets.client.NodeStatusServletClientFactory Maven / Gradle / Ivy

The newest version!
package com.infotel.seleniumrobot.grid.servlets.client;

import java.lang.reflect.InvocationTargetException;
import java.net.URL;

public class NodeStatusServletClientFactory {

    Class clientClass;

    public NodeStatusServletClientFactory() {
        clientClass = NodeStatusServletClient.class;
    }

    public NodeStatusServletClientFactory(Class 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