Java Doc for JdbcService.java in  » Database-Client » iSQL-Viewer » org » isqlviewer » sql » 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 Client » iSQL Viewer » org.isqlviewer.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.isqlviewer.sql.JdbcService

JdbcService
final public class JdbcService implements DataSource(Code)
Class that represents the connection to the database provider.


author:
   Mark A. Kobold <mkobold at isqlviewer dot com>
version:
   1.0




Constructor Summary
public  JdbcService()
    
public  JdbcService(JdbcCommandLogger commandLogger)
    

Method Summary
synchronized  voidclearConnection()
    
 ConnectioncreateDriverConnection(String username, String password)
     Build a connection to the database using the appropriate database driver.
 voiderror(Object message, Throwable error)
     Logs error messages and supplementary exception.
 voiderror(Object message)
     Logs an error message.
public  JdbcCommandLoggergetCommandLogger()
     Gets the current command logger for logging activity from this service.
public  ConnectiongetConnection()
    
public  ConnectiongetConnection(String username, String password)
    
public synchronized  StringgetCredentials()
     Get the user credentials/password for this connection.
public synchronized  StringgetDescription()
     Gets the user-defined description for this service.
public  DrivergetDriver()
    
public synchronized  StringgetDriverClass()
     Get the fully qualified driver class name for this connection.
public synchronized  PropertiesgetEnvironment()
     Get the connection environment for this connection.
public  PrintWritergetLogWriter()
    
public synchronized  intgetLoginTimeout()
    
public synchronized  StringgetName()
     Get the user-defined name for this service.

This name should identify this service to the end-user.

public synchronized  StringgetPrincipal()
     Gets the current user-name of this connection.
public synchronized  ConnectionProfilegetProfile()
     Gets the connection profile used by this connection.
public  ServiceTypegetType()
     Gets the type of service this instance represents.
public synchronized  StringgetUrl()
     Get the JDBC URL or connect string for this connection.
 voidinfo(Object message, Throwable error)
     Logs informational error and supplementary message.
 voidinfo(Object message)
     Logs an informational message.
public  voidsetCommandLogger(JdbcCommandLogger commandLogger)
    
public synchronized  voidsetCredentials(String credentials)
     Sets the credentials/password for the user of this connection.
public synchronized  voidsetDescription(String description)
     Sets the description for this service.
public synchronized  voidsetDriverClass(String driverClass)
     Sets the driver class for creating JDBC connections.
public synchronized  voidsetEnvironment(Properties environment)
    
public  voidsetLogWriter(PrintWriter writer)
    
public synchronized  voidsetLoginTimeout(int loginTimeout)
    
public synchronized  voidsetName(String name)
     Sets the conical name for this service.
public synchronized  voidsetPrincipal(String principal)
     Set the user-name to authenticate this connection with.
public synchronized  voidsetProfile(ConnectionProfile profile)
     Sets the profile for this service.
public  voidsetType(ServiceType type)
     Sets the type of service this instance represents.
public synchronized  voidsetUrl(String url)
     Set the JDBC URL or connect string for this connection.
 voidtrace(Object message, Throwable error)
     Logs debugging messages and supplementary exception.
 voidtrace(Object message)
     Logs message for debugging purposes.
 voidwarn(Object message, Throwable error)
     Logs warning messages and supplementary exception.
 voidwarn(Object message)
     Logs warning messages.


Constructor Detail
JdbcService
public JdbcService()(Code)



JdbcService
public JdbcService(JdbcCommandLogger commandLogger)(Code)




Method Detail
clearConnection
synchronized void clearConnection()(Code)



createDriverConnection
Connection createDriverConnection(String username, String password) throws SQLException(Code)
Build a connection to the database using the appropriate database driver.


See Also:   DriverManager.getConnection(java.lang.Stringjava.util.Properties) a connection to the database




error
void error(Object message, Throwable error)(Code)
Logs error messages and supplementary exception.

if error messages are enabled the message and exception will be logged to designated destination.
Parameters:
  message - error message to log.
Parameters:
  error - exception associated with the message.




error
void error(Object message)(Code)
Logs an error message.

if error logging is enabled the message will be logged to designated destination.
Parameters:
  message - error message to log.




getCommandLogger
public JdbcCommandLogger getCommandLogger()(Code)
Gets the current command logger for logging activity from this service.

null if no command logger is available.




getConnection
public Connection getConnection() throws SQLException(Code)



getConnection
public Connection getConnection(String username, String password) throws SQLException(Code)



getCredentials
public synchronized String getCredentials()(Code)
Get the user credentials/password for this connection.

password for the user-name with this connection.




getDescription
public synchronized String getDescription()(Code)
Gets the user-defined description for this service.

Purpose of the description is to allow a short text to describe this service as deemed by the user. user-defined description of this service.




getDriver
public Driver getDriver()(Code)



getDriverClass
public synchronized String getDriverClass()(Code)
Get the fully qualified driver class name for this connection.

Java class name of the driver connection to the database.




getEnvironment
public synchronized Properties getEnvironment()(Code)
Get the connection environment for this connection.

This environment will contain the platform-specific configuration options for the JDBC driver to use when creating the connection.

Please refer to the JDBC Driver instructions for configuring driver properties. driver properties that can tune platform specific options for this connection.




getLogWriter
public PrintWriter getLogWriter() throws SQLException(Code)



getLoginTimeout
public synchronized int getLoginTimeout() throws SQLException(Code)



getName
public synchronized String getName()(Code)
Get the user-defined name for this service.

This name should identify this service to the end-user. This is the name that should be used when looking up this service initially. the conical name for this service.




getPrincipal
public synchronized String getPrincipal()(Code)
Gets the current user-name of this connection.

user-name that is used to authenticate this connection.




getProfile
public synchronized ConnectionProfile getProfile()(Code)
Gets the connection profile used by this connection.

reference to the profile being used by this profile.




getType
public ServiceType getType()(Code)
Gets the type of service this instance represents.

the type of service this instance is.




getUrl
public synchronized String getUrl()(Code)
Get the JDBC URL or connect string for this connection.

the JDBC URL for this connection.




info
void info(Object message, Throwable error)(Code)
Logs informational error and supplementary message.

if informational messages are enabled the message and exception will be logged to designated destination.
Parameters:
  message - informational message to log.
Parameters:
  error - exception associated with the message.




info
void info(Object message)(Code)
Logs an informational message.

if informational loggins is enabled the message will be logged to designated destination.
Parameters:
  message - informational message to log.




setCommandLogger
public void setCommandLogger(JdbcCommandLogger commandLogger)(Code)

Parameters:
  commandHistory -



setCredentials
public synchronized void setCredentials(String credentials)(Code)
Sets the credentials/password for the user of this connection.


Parameters:
  credentials - userpassword for this connection.




setDescription
public synchronized void setDescription(String description)(Code)
Sets the description for this service.

Intent is to allow the user to define a short text regarding the purpose of this message.
Parameters:
  description - to set for this service.




setDriverClass
public synchronized void setDriverClass(String driverClass)(Code)
Sets the driver class for creating JDBC connections.


Parameters:
  driverClass - fully-qualified Java class name of the JDBC driver.




setEnvironment
public synchronized void setEnvironment(Properties environment)(Code)

Parameters:
  environment - The environment to set.



setLogWriter
public void setLogWriter(PrintWriter writer) throws SQLException(Code)



setLoginTimeout
public synchronized void setLoginTimeout(int loginTimeout) throws SQLException(Code)



setName
public synchronized void setName(String name)(Code)
Sets the conical name for this service.


Parameters:
  name - for this service so that it can be accessed by name for the end-user.




setPrincipal
public synchronized void setPrincipal(String principal)(Code)
Set the user-name to authenticate this connection with.


Parameters:
  principal - the user-name to use when authenticating this connection.




setProfile
public synchronized void setProfile(ConnectionProfile profile)(Code)
Sets the profile for this service.


Parameters:
  profile -




setType
public void setType(ServiceType type)(Code)
Sets the type of service this instance represents.

This parameter can be a bit confusing a iSQL-Viewer shared service is a service that is generally read-only and is loaded across the network from a shared location such as a intranet web server or even the local file system.

A private service is readable and writable by the user that created it, most cases the private services can also be a shared service for someone else depending on configurations.
Parameters:
  type - the type of service to set this service as.




setUrl
public synchronized void setUrl(String url)(Code)
Set the JDBC URL or connect string for this connection.

Please refer to the JDBC Driver instructions for populating this field.
Parameters:
  url - for the driver to use when creating a new connection.




trace
void trace(Object message, Throwable error)(Code)
Logs debugging messages and supplementary exception.

if debug messages are enabled the message and exception will be logged to designated destination.
Parameters:
  message - trace message to log.
Parameters:
  error - exception associated with the message.




trace
void trace(Object message)(Code)
Logs message for debugging purposes.

if debugging is enabled the message will be logged to designated destination.
Parameters:
  message - trace information to log.




warn
void warn(Object message, Throwable error)(Code)
Logs warning messages and supplementary exception.


Parameters:
  message - warning message to log.
Parameters:
  error - exception associated with the message.




warn
void warn(Object message)(Code)
Logs warning messages.


Parameters:
  message - warning information to log.




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.