public PlcConnection getConnection(String url, PlcAuthentication authentication) throws PlcConnectionException {
        ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(this.classLoader);
        PlcConnection connection;
        try {
            PlcDriver driver = getDriverForUrl(url);
            connection = driver.getConnection(url, authentication);
            connection.connect();
        } finally {
            Thread.currentThread().setContextClassLoader(originalClassLoader);
        }
        return connection;
    }
Connects to a PLC using the given plc connection string using given authentication credentials.

@param url            plc connection string.
@param authentication authentication credentials.
@return PlcConnection object.
@throws PlcConnectionException an exception if the connection attempt failed.
plc4j/api/src/main/java/org/apache/plc4x/java/DefaultPlcDriverManager.java