com.caucho.sql
Class DriverAdmin

java.lang.Object
  extended by com.caucho.management.server.AbstractManagedObject
      extended by com.caucho.sql.DriverAdmin
All Implemented Interfaces:
JdbcDriverMXBean, ManagedObjectMXBean

public class DriverAdmin
extends AbstractManagedObject
implements JdbcDriverMXBean


Constructor Summary
DriverAdmin(DriverConfig driver)
           
 
Method Summary
protected  void addObjectNameProperties(java.util.Map<java.lang.String,java.lang.String> props)
           
 java.lang.String getClassName()
          Returns the driver class
 long getConnectionCountTotal()
          Returns the total number of connections.
 long getConnectionFailCountTotal()
          Returns the total number of failed connections.
 java.util.Date getLastFailTime()
          Returns the last connection fail time.
 java.lang.String getName()
          The JMX name property of the mbean.
 java.util.Properties getProperties()
          Returns the drivers configured properties
 java.lang.String getState()
           
 java.lang.String getUrl()
          Returns the URL
 boolean start()
          Enable the port, letting it listening to new requests.
 boolean stop()
          Disable the port, stopping it from listening to new requests.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.management.server.AbstractManagedObject
getObjectName, getType, registerSelf, unregisterSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.management.server.ManagedObjectMXBean
getObjectName, getType
 

Constructor Detail

DriverAdmin

public DriverAdmin(DriverConfig driver)
Method Detail

getName

public java.lang.String getName()
Description copied from class: AbstractManagedObject
The JMX name property of the mbean.

Specified by:
getName in interface ManagedObjectMXBean
Specified by:
getName in class AbstractManagedObject

getClassName

public java.lang.String getClassName()
Description copied from interface: JdbcDriverMXBean
Returns the driver class

Specified by:
getClassName in interface JdbcDriverMXBean

getUrl

public java.lang.String getUrl()
Description copied from interface: JdbcDriverMXBean
Returns the URL

Specified by:
getUrl in interface JdbcDriverMXBean

getProperties

public java.util.Properties getProperties()
Description copied from interface: JdbcDriverMXBean
Returns the drivers configured properties

Specified by:
getProperties in interface JdbcDriverMXBean

addObjectNameProperties

protected void addObjectNameProperties(java.util.Map<java.lang.String,java.lang.String> props)
                                throws javax.management.MalformedObjectNameException
Overrides:
addObjectNameProperties in class AbstractManagedObject
Throws:
javax.management.MalformedObjectNameException

getState

public java.lang.String getState()
Specified by:
getState in interface JdbcDriverMXBean

getConnectionCountTotal

public long getConnectionCountTotal()
Description copied from interface: JdbcDriverMXBean
Returns the total number of connections.

Specified by:
getConnectionCountTotal in interface JdbcDriverMXBean

getConnectionFailCountTotal

public long getConnectionFailCountTotal()
Description copied from interface: JdbcDriverMXBean
Returns the total number of failed connections.

Specified by:
getConnectionFailCountTotal in interface JdbcDriverMXBean

getLastFailTime

public java.util.Date getLastFailTime()
Description copied from interface: JdbcDriverMXBean
Returns the last connection fail time.

Specified by:
getLastFailTime in interface JdbcDriverMXBean

start

public boolean start()
Enable the port, letting it listening to new requests.

Specified by:
start in interface JdbcDriverMXBean

stop

public boolean stop()
Disable the port, stopping it from listening to new requests.

Specified by:
stop in interface JdbcDriverMXBean

toString

public java.lang.String toString()
Overrides:
toString in class AbstractManagedObject