com.ibm.as400.access

Class ConnectionPoolEvent

  • java.lang.Object
    • java.util.EventObject
      • com.ibm.as400.access.ConnectionPoolEvent
  • All Implemented Interfaces:
    java.io.Serializable


    public class ConnectionPoolEvent
    extends java.util.EventObject
    The ConnectionPoolEvent class represents a connection pool event.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int CONNECTION_CREATED
      Event ID indicating that a connection has been created.
      static int CONNECTION_EXPIRED
      Event ID indicating that a connection has been cleaned up by the maintenance thread because one or more of its properties expired.
      static int CONNECTION_POOL_CLOSED
      Event ID indicating that a connection pool has been closed.
      static int CONNECTION_RELEASED
      Event ID indicating that a connection has been given to an application.
      static int CONNECTION_RETURNED
      Event ID indicating that a connection has been returned to the pool.
      static int MAINTENANCE_THREAD_RUN
      Event ID indicating that the maintenance thread is running.
      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor and Description
      ConnectionPoolEvent(java.lang.Object source, int eventID)
      Constructs a ConnectionPoolEvent object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int getID()
      Returns the identifier for this event.
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • CONNECTION_POOL_CLOSED

        public static final int CONNECTION_POOL_CLOSED
        Event ID indicating that a connection pool has been closed. A call to getSource() on an event with this ID will return a reference to a ConnectionPool object.
        See Also:
        Constant Field Values
      • CONNECTION_CREATED

        public static final int CONNECTION_CREATED
        Event ID indicating that a connection has been created. A call to getSource() on an event with this ID will return a reference to an AS400 object if fired from an AS400ConnectionPool; or, a reference to a javax.sql.PooledConnection object if fired from an AS400JDBCConnectionPool.
        See Also:
        Constant Field Values
      • CONNECTION_RELEASED

        public static final int CONNECTION_RELEASED
        Event ID indicating that a connection has been given to an application. A call to getSource() on an event with this ID will return a reference to an AS400 object if fired from an AS400ConnectionPool; or, a reference to a javax.sql.PooledConnection object if fired from an AS400JDBCConnectionPool.
        See Also:
        Constant Field Values
      • CONNECTION_RETURNED

        public static final int CONNECTION_RETURNED
        Event ID indicating that a connection has been returned to the pool. A call to getSource() on an event with this ID will return a reference to an AS400 object if fired from an AS400ConnectionPool; or, a reference to a javax.sql.PooledConnection object if fired from an AS400JDBCConnectionPool.
        See Also:
        Constant Field Values
      • CONNECTION_EXPIRED

        public static final int CONNECTION_EXPIRED
        Event ID indicating that a connection has been cleaned up by the maintenance thread because one or more of its properties expired. A call to getSource() on an event with this ID will return a reference to an AS400 object if fired from an AS400ConnectionPool; or, a reference to a javax.sql.PooledConnection object if fired from an AS400JDBCConnectionPool.
        See Also:
        Constant Field Values
      • MAINTENANCE_THREAD_RUN

        public static final int MAINTENANCE_THREAD_RUN
        Event ID indicating that the maintenance thread is running. A call to getSource() on an event with this ID will return a reference to a ConnectionPool object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ConnectionPoolEvent

        public ConnectionPoolEvent(java.lang.Object source,
                           int eventID)
        Constructs a ConnectionPoolEvent object. It uses the specified source and eventID.
        Parameters:
        source - The object where the event originated.
        eventID - The event identifier.
    • Method Detail

      • getID

        public int getID()
        Returns the identifier for this event.
        Returns:
        The identifier for this event.