Package org.simpleframework.util.thread

Examples of org.simpleframework.util.thread.PoolExecutor


    * @param allocator this is used to allocate any buffers needed
    * @param count this is the number of threads per thread pool
    * @param select this is the number of selector threads to use
    */
   public ContainerSelector(Container handler, Allocator allocator, int count, int select) throws IOException {
      this.executor = new PoolExecutor(Dispatcher.class, count);
      this.collect = new PoolExecutor(Reader.class, count);
      this.reactor = new ExecutorReactor(collect, select);    
      this.allocator = allocator;
      this.handler = handler;
   }
View Full Code Here


    *
    * @param processor this is used to process the transports
    * @param count this is the number of threads used by this
    */
   public SecureNegotiator(Processor processor, int count) throws IOException {         
     this.executor = new PoolExecutor(Notifier.class, count);         
     this.reactor = new ExecutorReactor(executor);           
     this.processor = processor;                 
  
View Full Code Here

      }
      dumper.kill();
   }
 
   public static Client createClient(InetSocketAddress address, String tag) throws Exception {
      PoolExecutor executor = new PoolExecutor(Runnable.class, 20);
      int port = address.getPort();
      Client client = new Client(executor, port, tag);

      client.start();
      return client;
View Full Code Here

      private final ThreadDumper dumper;
      private final List<String> list;
      private final List<java.net.Socket> sockets;
     
      public Pinger(int port, boolean socket, int count) throws Exception {
         this.executor = new PoolExecutor(Pinger.class, count);
         this.list = new Vector<String>(count);
         this.sockets = new Vector<java.net.Socket>(count);
         this.latch = new CountDownLatch(count);
         this.stop = new CountDownLatch(count + count);
         this.dumper = new ThreadDumper();
View Full Code Here

    * @param allocator this is used to allocate any buffers needed
    * @param count this is the number of threads per thread pool
    * @param select this is the number of selector threads to use
    */
   public ContainerSelector(Container handler, Allocator allocator, int count, int select) throws IOException {
      this.collect = new PoolExecutor(Reader.class, count);
      this.reactor = new ExecutorReactor(collect, select);
      this.executor = new PoolExecutor(Dispatcher.class, count);     
      this.tracker = new CookieTracker();
      this.allocator = allocator;
      this.handler = handler;
   }
View Full Code Here

      }
      dumper.kill();
   }
 
   public static Client createClient(InetSocketAddress address, String tag) throws Exception {
      PoolExecutor executor = new PoolExecutor(Runnable.class, 20);
      int port = address.getPort();
      Client client = new Client(executor, port, tag);

      client.start();
      return client;
View Full Code Here

    *
    * @param transporter this is used to process the transports
    * @param count this is the number of threads used by this
    */
   public SecureNegotiator(Processor transporter, int count) throws IOException {         
     this.executor = new PoolExecutor(Notifier.class, count);         
     this.reactor = new ExecutorReactor(executor);           
     this.transporter = transporter;                 
  
View Full Code Here

      private final ThreadDumper dumper;
      private final List<String> list;
      private final List<java.net.Socket> sockets;
     
      public Pinger(int port, boolean socket, int count) throws Exception {
         this.executor = new PoolExecutor(Pinger.class, count);
         this.list = new Vector<String>(count);
         this.sockets = new Vector<java.net.Socket>(count);
         this.latch = new CountDownLatch(count);
         this.stop = new CountDownLatch(count + count);
         this.dumper = new ThreadDumper();
View Full Code Here

TOP

Related Classes of org.simpleframework.util.thread.PoolExecutor

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.