Buglet - buglet.sourceforge.org

org.buglet.db
Class ConHandle

java.lang.Object
  |
  +--org.buglet.db.ConHandle

public class ConHandle
extends java.lang.Object

Connection handle to the database.


Field Summary
(package private)  java.sql.Connection con
          sql database handle
(package private)  boolean inUse
          indicate whether the connection handle is in use.
(package private)  long timeStamp
          timestamp to indicate when the connection was opened.
 
Constructor Summary
ConHandle(java.sql.Connection con, boolean inUse)
          constructor.
 
Method Summary
 void free()
          mark this connection as free.
 java.sql.Connection getCon()
          get the connection handle.
 long getTime()
          get the timestamp.
 boolean inUse()
          method to determine if connection is in use.
 boolean isClosed()
          figure out if connection is closed.
 void setCon(java.sql.Connection con)
          set the connection handle
 void used()
          mark this connection as used.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inUse

boolean inUse
indicate whether the connection handle is in use.

con

java.sql.Connection con
sql database handle

timeStamp

long timeStamp
timestamp to indicate when the connection was opened.
Constructor Detail

ConHandle

public ConHandle(java.sql.Connection con,
                 boolean inUse)
constructor.
Parameters:
con -  
inUse -  
Method Detail

isClosed

public boolean isClosed()
figure out if connection is closed.

getTime

public long getTime()
get the timestamp.

used

public void used()
mark this connection as used.

free

public void free()
mark this connection as free.

inUse

public boolean inUse()
method to determine if connection is in use.

getCon

public java.sql.Connection getCon()
get the connection handle.

setCon

public void setCon(java.sql.Connection con)
set the connection handle
Parameters:
con -  

Buglet - buglet.sourceforge.org

Copyright © 2001 58k.com Inc. All Rights Reserved