Package com.surftools.BeanstalkClientImpl

Examples of com.surftools.BeanstalkClientImpl.ClientImpl


            throw new IllegalArgumentException("There must be only one tube specified for Beanstalk producer");
        }

        final String tube = tubes.length > 0 ? tubes[0] : BeanstalkComponent.DEFAULT_TUBE;

        final ClientImpl client = new ClientImpl(host, port);

        /* FIXME: There is a problem in JavaBeanstalkClient 1.4.4 (at least in 1.4.4),
           when using uniqueConnectionPerThread=false. The symptom is that ProtocolHandler
           breaks the protocol, reading incomplete messages. To be investigated. */
        //client.setUniqueConnectionPerThread(false);
        client.useTube(tube);
        return client;
    }
View Full Code Here


     *
     * @param useBlockIO configuration param to {@link Client}
     * @return {@link Client} instance
     */
    public Client newReadingClient(boolean useBlockIO) {
        final ClientImpl client = new ClientImpl(host, port, useBlockIO);

        /* FIXME: There is a problem in JavaBeanstalkClient 1.4.4 (at least in 1.4.4),
           when using uniqueConnectionPerThread=false. The symptom is that ProtocolHandler
           breaks the protocol, reading incomplete messages. To be investigated. */
        //client.setUniqueConnectionPerThread(false);
        for (String tube : tubes) {
            client.watch(tube);
        }
        return client;
    }
View Full Code Here

TOP

Related Classes of com.surftools.BeanstalkClientImpl.ClientImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.