1 17 18 package org.apache.geronimo.connector.work.pool; 19 20 26 public class NullWorkExecutorPool implements WorkExecutorPool { 27 28 private int maxSize; 29 30 public NullWorkExecutorPool(int maxSize) { 31 this.maxSize = maxSize; 32 } 33 34 public int getPoolSize() { 35 return 0; 36 } 37 38 public int getMaximumPoolSize() { 39 return maxSize; 40 } 41 42 public void setMaximumPoolSize(int maxSize) { 43 this.maxSize = maxSize; 44 } 45 46 public WorkExecutorPool start() { 47 return new WorkExecutorPoolImpl(maxSize); 48 } 49 50 public WorkExecutorPool stop() { 51 return this; 52 } 53 54 public void execute(Runnable command) { 55 throw new IllegalStateException ("Stopped"); 56 } 57 } 58 | Popular Tags |