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.


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)
           
 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 register()
          Register the JAMon driver.
 
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

register

public static void register()
Register the JAMon driver. Any access to this object in general will register the driver. This method is provided to enable a more explicit way of registering it.


connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties info)
                            throws java.sql.SQLException
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