com.hardcode.gdbms.engine.data
Class OpenCloseCounter

java.lang.Object
  extended by com.hardcode.gdbms.engine.data.OpenCloseCounter

public class OpenCloseCounter
extends java.lang.Object

Used to keep a DataSource from being closed to many times

Author:
Fernando González Cortés

Constructor Summary
OpenCloseCounter(DataSource ds)
           
 
Method Summary
 boolean isOpen()
          Returns true if the datasource is opened and false if it's closed
 boolean start()
          Returns true if the DataSource has to open the driver or it's already opened
 boolean stop()
          Returns true if the DataSource has to close the driver or must be kept open until, at least, next call to close.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenCloseCounter

public OpenCloseCounter(DataSource ds)
Method Detail

start

public boolean start()
Returns true if the DataSource has to open the driver or it's already opened

Returns:

stop

public boolean stop()
Returns true if the DataSource has to close the driver or must be kept open until, at least, next call to close.

Returns:

isOpen

public boolean isOpen()
Returns true if the datasource is opened and false if it's closed

Returns:


Copyright © 2005-2006 . All Rights Reserved.