1 /* 2 * @(#) ConnectionLeakEvent.java 1.0 02/08/01 3 */ 4 5 package org.smartlib.pool.core; 6 7 8 /** 9 * This method defines the behavior of the class encapsulting a connection 10 * leak event. When ever a connection is blocked by the consumer for more than 11 * a then the specified time, a connection leak is said to have occurred. 12 * Information regarding this leak is encapsulated by an object whose behavior 13 * is defined by this interface. 14 * 15 * @author Sachin Shekar Shetty 16 * @version 1.0, 02/08/01 17 */ 18 19 import java.sql.*; 20 21 public interface ConnectionLeakEvent { 22 23 /** 24 * @return Connection which has been blocked by the consumer for more 25 * than the specified time. 26 */ 27 public Connection getConnection(); 28 29 /** 30 * @return The owner of the connection. 31 */ 32 public String getOwner(); 33 34 /** 35 * @return Timestamp when the connection was accessed last time. 36 */ 37 public long getLastAccessedTime(); 38 39 /** 40 * @return Timestamp when connection was drawn from the pool. 41 */ 42 public long getConnectionObtainedTime(); 43 44 /** 45 * @return Name of the pool. 46 */ 47 public String getPoolName(); 48 49 } 50