public class JBrowserDriverPool extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
JBrowserDriverPool.ThrowingFunction<T,R> |
Constructor and Description |
---|
JBrowserDriverPool() |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
static org.apache.commons.pool2.ObjectPool<com.machinepublishers.jbrowserdriver.JBrowserDriver> |
getDriverPool() |
static <T> T |
perform(JBrowserDriverPool.ThrowingFunction<com.machinepublishers.jbrowserdriver.JBrowserDriver,T> action,
Function<Exception,T> onError)
Takes an object from the pool, perform the given action and makes sure to return the borrowed object to the pool
afterwards.
|
public static org.apache.commons.pool2.ObjectPool<com.machinepublishers.jbrowserdriver.JBrowserDriver> getDriverPool()
public static <T> T perform(JBrowserDriverPool.ThrowingFunction<com.machinepublishers.jbrowserdriver.JBrowserDriver,T> action, Function<Exception,T> onError)
action
- Action to be performed with the JBrowserDriver.onError
- Handler when an error occurs while performing the action or while borrowing an object.Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.