com.jamonapi.proxy
Class JAMonDriver

java.lang.Object
  extended by com.jamonapi.proxy.JAMonDriver
All Implemented Interfaces:
java.sql.Driver

public class JAMonDriver
extends java.lang.Object
implements java.sql.Driver

This class will be a proxy for the underlying jdbc driver.

Author:
steve souza

Constructor Summary
JAMonDriver()
           
 
Method Summary
 boolean acceptsURL(java.lang.String url)
          Returns true if this driver can respond to the url
 java.sql.Connection connect(java.lang.String url, java.util.Properties info)
          (non-Javadoc)
 int getMajorVersion()
           
 int getMinorVersion()
           
 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
          Returns this drivers properties.
static java.lang.String getRealDriverName(java.lang.String url)
          Takes a url of the jamon format: jdbc:jamon:sybase:Tds:myserver:1234/mydatabase?jamonrealdriver=com.sybase.jdbc3.jdbc.SybDriver&LITERAL_PARAMS=true&PACKETSIZE=512&HOSTNAME=myhost and returns: com.sybase.jdbc3.jdbc.SybDriver
static java.lang.String getRealURL(java.lang.String url)
          Takes a url of the jamon format: jdbc:jamon:sybase:Tds:myserver:1234/mydatabase?jamonrealdriver=com.sybase.jdbc3.jdbc.SybDriver&LITERAL_PARAMS=true&PACKETSIZE=512&HOSTNAME=myhost and returns the real url associated with the underlying driver: jdbc:sybase:Tds:myserver:1234/mydatabase?LITERAL_PARAMS=true&PACKETSIZE=512&HOSTNAME=myhost
 boolean jdbcCompliant()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAMonDriver

public JAMonDriver()
Method Detail

connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties info)
                            throws java.sql.SQLException
(non-Javadoc)

Specified by:
connect in interface java.sql.Driver
Throws:
java.sql.SQLException
See Also:
Driver.connect(java.lang.String, java.util.Properties)

acceptsURL

public boolean acceptsURL(java.lang.String url)
                   throws java.sql.SQLException
Returns true if this driver can respond to the url

Specified by:
acceptsURL in interface java.sql.Driver
Throws:
java.sql.SQLException

getPropertyInfo

public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                                     java.util.Properties info)
                                              throws java.sql.SQLException
Returns this drivers properties. Currently the only property is 'jamonrealdriver'

Specified by:
getPropertyInfo in interface java.sql.Driver
Throws:
java.sql.SQLException

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface java.sql.Driver

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface java.sql.Driver

jdbcCompliant

public boolean jdbcCompliant()
Specified by:
jdbcCompliant in interface java.sql.Driver

getRealDriverName

public static java.lang.String getRealDriverName(java.lang.String url)
Takes a url of the jamon format: jdbc:jamon:sybase:Tds:myserver:1234/mydatabase?jamonrealdriver=com.sybase.jdbc3.jdbc.SybDriver&LITERAL_PARAMS=true&PACKETSIZE=512&HOSTNAME=myhost and returns: com.sybase.jdbc3.jdbc.SybDriver


getRealURL

public static java.lang.String getRealURL(java.lang.String url)
Takes a url of the jamon format: jdbc:jamon:sybase:Tds:myserver:1234/mydatabase?jamonrealdriver=com.sybase.jdbc3.jdbc.SybDriver&LITERAL_PARAMS=true&PACKETSIZE=512&HOSTNAME=myhost and returns the real url associated with the underlying driver: jdbc:sybase:Tds:myserver:1234/mydatabase?LITERAL_PARAMS=true&PACKETSIZE=512&HOSTNAME=myhost


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception