Example usage for org.apache.commons.pool BaseKeyedPoolableObjectFactory subclass-usage

List of usage examples for org.apache.commons.pool BaseKeyedPoolableObjectFactory subclass-usage

Introduction

In this page you can find the example usage for org.apache.commons.pool BaseKeyedPoolableObjectFactory subclass-usage.

Usage

From source file com.googlecode.jmxtrans.connections.DatagramSocketFactory.java

/**
 * Allows us to pool socket connections.
 */
public class DatagramSocketFactory extends BaseKeyedPoolableObjectFactory<SocketAddress, DatagramSocket> {

    /**

From source file com.googlecode.jmxtrans.connections.MBeanServerConnectionFactory.java

public class MBeanServerConnectionFactory
        extends BaseKeyedPoolableObjectFactory<JmxConnectionProvider, JMXConnection> {
    @Override
    @Nonnull
    public JMXConnection makeObject(@Nonnull JmxConnectionProvider server) throws IOException {
        if (server.isLocal()) {

From source file com.edgenius.wiki.plugin.PluginPoolFactory.java

/**
 * @author Dapeng.Ni
 */
public class PluginPoolFactory extends BaseKeyedPoolableObjectFactory implements ApplicationContextAware {
    private static final Logger log = LoggerFactory.getLogger(PluginPoolFactory.class);
    private ApplicationContext context;

From source file com.edgenius.wiki.render.object.ObjectHandlerFactory.java

/**
 * @author Dapeng.Ni
 */
public class ObjectHandlerFactory extends BaseKeyedPoolableObjectFactory implements ApplicationContextAware {
    private static final Logger log = LoggerFactory.getLogger(ObjectHandlerFactory.class);
    private ApplicationContext context;

From source file com.googlecode.jmxtrans.connections.JmxConnectionFactory.java

/**
 * Allows us to pool connections to remote jmx servers.
 */
public class JmxConnectionFactory extends BaseKeyedPoolableObjectFactory<JMXConnectionParams, JMXConnector> {

    /**

From source file com.googlecode.jmxtrans.connections.SocketFactory.java

/**
 * Allows us to pool socket connections.
 */
public class SocketFactory extends BaseKeyedPoolableObjectFactory<InetSocketAddress, Socket> {

    private final Logger log = LoggerFactory.getLogger(getClass());

From source file au.org.intersect.dms.wn.transports.impl.HddTransportFactory.java

/**
 * Connection pool to a HTTP Tunnel to download or upload files from a PC
 */
public class HddTransportFactory extends BaseKeyedPoolableObjectFactory implements TransportFactory {
    private static final String PROTOCOL = "hdd";

From source file org.wso2.carbon.databridge.agent.thrift.internal.pool.client.general.ClientPoolFactory.java

public class ClientPoolFactory extends BaseKeyedPoolableObjectFactory {

    @Override
    public ThriftEventTransmissionService.Client makeObject(Object key) throws TTransportException {
        String[] keyElements = key.toString().split(AgentConstants.SEPARATOR);
        if (keyElements[0].equals(ReceiverConfiguration.Protocol.TCP.toString())) {

From source file TestKeyedObjectPool.java

    public class SkilledEmployeeFactory extends BaseKeyedPoolableObjectFactory {

        public Object makeObject(Object key) {
            if (key == null || !(key instanceof String) || ((String) key).length() == 0)
                throw new IllegalArgumentException("Invalid key specified");
            return new SkilledEmployee(key.toString());

From source file org.springframework.ldap.pool.factory.DirContextPoolableObjectFactory.java

/**
 * Factory that creates {@link DirContext} instances for pooling via a
 * configured {@link ContextSource}. The {@link DirContext}s are keyed based
 * on if they are read only or read/write. The expected key type is the
 * {@link DirContextType} enum.
 *