1 4 package org.ofbiz.minerva.pool; 5 6 12 public abstract class PoolObjectFactory { 13 14 25 public abstract Object createObject(Object parameters) throws Exception ; 26 27 33 public boolean checkValidObject(Object source, Object parameters) { 34 return true; 35 } 36 37 47 public void poolStarted(ObjectPool pool) { 48 if (pool == null) 49 throw new IllegalArgumentException ("Cannot start factory with null pool!"); 50 } 51 52 62 public Object prepareObject(Object pooledObject) { 63 return pooledObject; 64 } 65 66 79 public Object translateObject(Object clientObject) { 80 return clientObject; 81 } 82 83 92 public Object returnObject(Object clientObject) { 93 return clientObject; 94 } 95 96 107 public void poolClosing(ObjectPool pool) { 108 if (pool == null) 109 throw new IllegalArgumentException ("Cannot close factory with a null pool!"); 110 } 111 112 117 public void deleteObject(Object pooledObject) { 118 } 119 120 129 public Object isUniqueRequest() { 130 return null; 131 } 132 } 133 | Popular Tags |