1 4 package org.ofbiz.minerva.pool; 5 6 import java.util.EventObject ; 7 8 16 public class PoolEvent extends EventObject { 17 18 23 public final static int OBJECT_CLOSED = -8986432; 24 31 public final static int OBJECT_ERROR = -8986433; 32 36 public final static int OBJECT_USED = -8986434; 37 38 private int type; 39 private boolean catastrophic = false; 40 41 49 public PoolEvent(Object source, int type) { 50 super(source); 51 if (type != OBJECT_CLOSED && type != OBJECT_ERROR && type != OBJECT_USED) 52 throw new IllegalArgumentException ("Invalid event type!"); 53 this.type = type; 54 } 55 56 62 public int getType() { 63 return type; 64 } 65 66 70 public boolean isCatastrophic() { 71 return catastrophic; 72 } 73 74 78 public void setCatastrophic() { 79 catastrophic = true; 80 } 81 } 82 | Popular Tags |