org.apache.derbyTesting.functionTests.tests.jdbcapi
Class AssertEventCatcher

java.lang.Object
  extended by org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher
All Implemented Interfaces:
java.util.EventListener, javax.sql.ConnectionEventListener

public class AssertEventCatcher
extends java.lang.Object
implements javax.sql.ConnectionEventListener


Field Summary
private  int catcher
           
private  boolean gotConnectionClosed
           
private  boolean gotConnectionErrorOccured
           
 
Constructor Summary
AssertEventCatcher(int which)
           
 
Method Summary
 void connectionClosed(javax.sql.ConnectionEvent event)
           
 void connectionErrorOccurred(javax.sql.ConnectionEvent event)
           
 boolean didConnectionClosedEventHappen()
          Tell the caller if we received Connection closed event
 boolean didConnectionErrorEventHappen()
          Tell the caller if we received Connection error event
 void resetState()
          Clear the event received flags for this listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

catcher

private final int catcher

gotConnectionClosed

private boolean gotConnectionClosed

gotConnectionErrorOccured

private boolean gotConnectionErrorOccured
Constructor Detail

AssertEventCatcher

public AssertEventCatcher(int which)
Method Detail

connectionClosed

public void connectionClosed(javax.sql.ConnectionEvent event)
Specified by:
connectionClosed in interface javax.sql.ConnectionEventListener

connectionErrorOccurred

public void connectionErrorOccurred(javax.sql.ConnectionEvent event)
Specified by:
connectionErrorOccurred in interface javax.sql.ConnectionEventListener

didConnectionClosedEventHappen

public boolean didConnectionClosedEventHappen()
Tell the caller if we received Connection closed event

Returns:
true if received Connection closed event

didConnectionErrorEventHappen

public boolean didConnectionErrorEventHappen()
Tell the caller if we received Connection error event

Returns:
true if received Connection error event

resetState

public void resetState()
Clear the event received flags for this listener.


Built on Thu 2009-11-26 18:42:53-0800, from revision 884739

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.