Java Doc for ProxyConnection.java in  » Database-JDBC-Connection-Pool » proxool » org » logicalcobwebs » proxool » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » proxool » org.logicalcobwebs.proxool 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.logicalcobwebs.proxool.ProxyConnection

ProxyConnection
public class ProxyConnection implements ProxyConnectionIF(Code)
Manages a connection. This is wrapped up inside a...
version:
   $Revision: 1.37 $, $Date: 2006/01/18 14:40:02 $
author:
   bill
author:
   $Author: billhorsman $ (current maintainer)
since:
   Proxool 0.10


Field Summary
final static  intSTATUS_FORCE
    

Constructor Summary
protected  ProxyConnection(Connection connection, long id, String delegateUrl, ConnectionPool connectionPool, ConnectionPoolDefinitionIF definition, int status)
    

Method Summary
protected  voidaddOpenStatement(Statement statement)
     By calling this we can keep track of any statements that are left open when this connection is returned to the pool.
public  voidaddSqlCall(String sqlCall)
    
public  voidclose()
    
public  intcompareTo(Object o)
    
public  booleanequals(Object obj)
    
public  longgetAge()
    
public  DategetBirthDate()
    
public  longgetBirthTime()
    
public  ConnectiongetConnection()
    
protected  ConnectionPoolgetConnectionPool()
    
public  ConnectionPoolDefinitionIFgetDefinition()
    
public  StringgetDelegateHashcode()
    
public  StringgetDelegateUrl()
    
public  longgetId()
    
public  StringgetLastSqlCall()
    
public  intgetMark()
    
public  StringgetProxyHashcode()
    
public  StringgetReasonForMark()
    
public  StringgetRequester()
    
public  String[]getSqlCalls()
    
public  intgetStatus()
    
public  longgetTimeLastStartActive()
    
public  longgetTimeLastStopActive()
    
public  booleanisActive()
    
public  booleanisAvailable()
    
public  booleanisClosed()
     Whether this connection is available.
public  booleanisMarkedForExpiry()
    
public  booleanisNull()
    
public  booleanisOffline()
    
public  booleanisReallyClosed()
    
public  voidmarkForExpiry(String reason)
    
protected  voidopen()
     This gets called /just/ before a connection is served.
public  voidreallyClose()
    
public  voidregisterClosedStatement(Statement statement)
    
public  voidsetBirthTime(long birthTime)
    
public  voidsetId(long id)
    
protected  voidsetNeedToReset(boolean needToReset)
     The subclass should call this to indicate that a change has been made to the connection that might mean it needs to be reset (like setting autoCommit to false or something).
public  voidsetRequester(String requester)
    
public  booleansetStatus(int newStatus)
    
public  booleansetStatus(int oldStatus, int newStatus)
    
public  voidsetTimeLastStartActive(long timeLastStartActive)
    
public  voidsetTimeLastStopActive(long timeLastStopActive)
    
public  StringtoString()
    

Field Detail
STATUS_FORCE
final static int STATUS_FORCE(Code)




Constructor Detail
ProxyConnection
protected ProxyConnection(Connection connection, long id, String delegateUrl, ConnectionPool connectionPool, ConnectionPoolDefinitionIF definition, int status) throws SQLException(Code)

Parameters:
  connection - the real connection that is used
Parameters:
  id - unique ID
Parameters:
  delegateUrl -
Parameters:
  connectionPool - the pool it is a member of
Parameters:
  definition - the definition that was used to build it (could possibly be different fromthe one held in the connectionPool)
Parameters:
  status - ProxyConnection.STATUS_ACTIVE, ProxyConnection.STATUS_AVAILABLE, ProxyConnection.STATUS_FORCE, ProxyConnection.STATUS_NULL, or ProxyConnection.STATUS_OFFLINE
throws:
  SQLException -




Method Detail
addOpenStatement
protected void addOpenStatement(Statement statement)(Code)
By calling this we can keep track of any statements that are left open when this connection is returned to the pool.
Parameters:
  statement - the statement that we have just opened/created.
See Also:   ProxyConnection.registerClosedStatement



addSqlCall
public void addSqlCall(String sqlCall)(Code)



close
public void close() throws SQLException(Code)

See Also:   ProxyConnectionIF.close



compareTo
public int compareTo(Object o)(Code)
Compares using ProxyConnection.getId()
Parameters:
  o - must be another ConnectionInfoIF implementation the comparison
See Also:   Comparable.compareTo(Object)



equals
public boolean equals(Object obj)(Code)
Whether the underlying connections are equal
Parameters:
  obj - the object (probably another connection) that weare being compared to whether they are the same



getAge
public long getAge()(Code)

See Also:   ConnectionInfoIF.getAge



getBirthDate
public Date getBirthDate()(Code)

See Also:   ConnectionInfoIF.getBirthDate



getBirthTime
public long getBirthTime()(Code)

See Also:   ConnectionInfoIF.getBirthTime



getConnection
public Connection getConnection()(Code)

See Also:   ProxyConnectionIF.getConnection



getConnectionPool
protected ConnectionPool getConnectionPool()(Code)
The ConnectionPool that this connection belongs to connectionPool



getDefinition
public ConnectionPoolDefinitionIF getDefinition()(Code)
Get the definition that was used to create this connection definition



getDelegateHashcode
public String getDelegateHashcode()(Code)

See Also:   ConnectionInfoIF.getDelegateHashcode



getDelegateUrl
public String getDelegateUrl()(Code)

See Also:   ConnectionInfoIF.getDelegateUrl



getId
public long getId()(Code)



getLastSqlCall
public String getLastSqlCall()(Code)



getMark
public int getMark()(Code)



getProxyHashcode
public String getProxyHashcode()(Code)

See Also:   ConnectionInfoIF.getProxyHashcode



getReasonForMark
public String getReasonForMark()(Code)

See Also:   ProxyConnectionIF.getReasonForMark



getRequester
public String getRequester()(Code)

See Also:   ConnectionInfoIF.getRequester



getSqlCalls
public String[] getSqlCalls()(Code)



getStatus
public int getStatus()(Code)



getTimeLastStartActive
public long getTimeLastStartActive()(Code)

See Also:   ConnectionInfoIF.getTimeLastStartActive



getTimeLastStopActive
public long getTimeLastStopActive()(Code)

See Also:   ConnectionInfoIF.getTimeLastStopActive



isActive
public boolean isActive()(Code)

See Also:   ProxyConnectionIF.isActive



isAvailable
public boolean isAvailable()(Code)

See Also:   ProxyConnectionIF.isAvailable



isClosed
public boolean isClosed()(Code)
Whether this connection is available. (When you close the connection it doesn't really close, it just becomes available for others to use). true if the connection is not active



isMarkedForExpiry
public boolean isMarkedForExpiry()(Code)

See Also:   ProxyConnectionIF.isMarkedForExpiry



isNull
public boolean isNull()(Code)

See Also:   ProxyConnectionIF.isNull



isOffline
public boolean isOffline()(Code)

See Also:   ProxyConnectionIF.isOffline



isReallyClosed
public boolean isReallyClosed() throws SQLException(Code)

See Also:   ProxyConnectionIF.isReallyClosed



markForExpiry
public void markForExpiry(String reason)(Code)

See Also:   ProxyConnectionIF.markForExpiry



open
protected void open()(Code)
This gets called /just/ before a connection is served. You can use it to reset some of the attributes. The lifecycle is: ProxyConnection.open() then ProxyConnection.close()



reallyClose
public void reallyClose() throws SQLException(Code)
Close the connection for real
throws:
  java.sql.SQLException - if anything goes wrong



registerClosedStatement
public void registerClosedStatement(Statement statement)(Code)

See Also:   ProxyConnectionIF.registerClosedStatement



setBirthTime
public void setBirthTime(long birthTime)(Code)

See Also:   ConnectionInfoIF.getBirthTime



setId
public void setId(long id)(Code)



setNeedToReset
protected void setNeedToReset(boolean needToReset)(Code)
The subclass should call this to indicate that a change has been made to the connection that might mean it needs to be reset (like setting autoCommit to false or something). We don't reset unless this has been called to avoid the overhead of unnecessary resetting.
Parameters:
  needToReset - true if the connection might need resetting.



setRequester
public void setRequester(String requester)(Code)

See Also:   ConnectionInfoIF.getRequester



setStatus
public boolean setStatus(int newStatus)(Code)

See Also:   ProxyConnectionIF.setStatus(int)



setStatus
public boolean setStatus(int oldStatus, int newStatus)(Code)

See Also:   ProxyConnectionIF.setStatus(intint)



setTimeLastStartActive
public void setTimeLastStartActive(long timeLastStartActive)(Code)

See Also:   ConnectionInfoIF.getTimeLastStartActive



setTimeLastStopActive
public void setTimeLastStopActive(long timeLastStopActive)(Code)

See Also:   ConnectionInfoIF.getTimeLastStopActive



toString
public String toString()(Code)

See Also:   Object.toString



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.