org.opensync.engine.server.connector
Class BDConnector

java.lang.Object
  extended byorg.opensync.engine.server.DefaultConnector
      extended byorg.opensync.engine.server.connector.BDConnector
All Implemented Interfaces:
Connector, java.io.Serializable

public class BDConnector
extends DefaultConnector

The connector used to connect to a database server

See Also:
Serialized Form

Field Summary
protected  java.lang.String conversion_function
          The operator for conversion
(package private)  org.apache.commons.dbcp.BasicDataSource dataSource
           
protected  java.lang.String driver
          The jdbc driver
protected  int init
          The minimum of the opened connection
protected  int max
          The maximum of the opened connection
protected  java.lang.String operatorConcat
          The operator for concatenation
protected  java.lang.String password
          The user password
protected  java.lang.String source
          The source
protected  int timeout
          The time out
protected  java.lang.String user
          The user login
 
Fields inherited from class org.opensync.engine.server.DefaultConnector
adapter, incremental, protocol, type, url
 
Fields inherited from interface org.opensync.engine.server.Connector
BD, FILE
 
Constructor Summary
BDConnector()
           
BDConnector(java.lang.String source)
          Construct a FileConnetor object
 
Method Summary
 ConnectionPool getConnectionPool()
          Get the connection pool
 java.lang.String getConversionFunction()
          Get the conversion function
 java.lang.String getDriver()
          Get the jdbc driver
 int getInit()
          Get the minimum of the opened connection
 int getMax()
          Get the maximum of the opened connection
 java.lang.String getOperatorConcat()
          Get the operator for concatenation
 java.lang.String getPassword()
          Get the user password used to connect to the database server
 int getTimeout()
          Get the time out
 java.lang.String getUser()
          Get the user login used to connect to the database server
 int getWindowSize()
           
 void release()
           
 void releaseWithException()
           
 void setConversionFunction(java.lang.String sConversionFunction)
          Set the conversion function
 void setDataSource(org.apache.commons.dbcp.BasicDataSource dataSource)
           
 void setDriver(java.lang.String driver)
          Set the jdbc driver
 void setInit(int init)
          Set the minimum of the opened connection
 void setMax(int max)
          Set the maximum of the opened connection
 void setOperatorConcat(java.lang.String operatorConcat)
          Set the operator for concatenation
 void setPassword(java.lang.String password)
          Set the user password used to connect to the file server
 void setTimeout(int timeout)
          Set time-out
 void setUser(java.lang.String user)
          Set the user login used to connect to the database server
 void setWindowSize(int windowSize)
           
 java.lang.String toString()
          Use for debug only
 void validate()
           
 
Methods inherited from class org.opensync.engine.server.DefaultConnector
getAdapter, getIncremental, getProtocol, getType, getUrl, setAdapter, setIncremental, setProtocol, setType, setUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataSource

org.apache.commons.dbcp.BasicDataSource dataSource

user

protected java.lang.String user
The user login


driver

protected java.lang.String driver
The jdbc driver


source

protected java.lang.String source
The source


password

protected java.lang.String password
The user password


max

protected int max
The maximum of the opened connection


init

protected int init
The minimum of the opened connection


timeout

protected int timeout
The time out


operatorConcat

protected java.lang.String operatorConcat
The operator for concatenation


conversion_function

protected java.lang.String conversion_function
The operator for conversion

Constructor Detail

BDConnector

public BDConnector()

BDConnector

public BDConnector(java.lang.String source)
Construct a FileConnetor object

Parameters:
source - the source name
Method Detail

setUser

public void setUser(java.lang.String user)
Set the user login used to connect to the database server

Parameters:
user -

getUser

public java.lang.String getUser()
Get the user login used to connect to the database server


setDriver

public void setDriver(java.lang.String driver)
Set the jdbc driver

Parameters:
driver -

getDriver

public java.lang.String getDriver()
Get the jdbc driver


getConnectionPool

public ConnectionPool getConnectionPool()
                                 throws java.sql.SQLException
Get the connection pool

Throws:
java.sql.SQLException

setPassword

public void setPassword(java.lang.String password)
Set the user password used to connect to the file server

Parameters:
password - the password

getPassword

public java.lang.String getPassword()
Get the user password used to connect to the database server


setMax

public void setMax(int max)
Set the maximum of the opened connection

Parameters:
max - the maximum

getMax

public int getMax()
Get the maximum of the opened connection


setInit

public void setInit(int init)
Set the minimum of the opened connection

Parameters:
init -

getInit

public int getInit()
Get the minimum of the opened connection


setTimeout

public void setTimeout(int timeout)
Set time-out

Parameters:
timeout - the timeout

getTimeout

public int getTimeout()
Get the time out


validate

public void validate()
              throws OpenSyncException
Specified by:
validate in interface Connector
Overrides:
validate in class DefaultConnector
Throws:
OpenSyncException

release

public void release()
             throws java.sql.SQLException
Specified by:
release in interface Connector
Overrides:
release in class DefaultConnector
Returns:
Throws:
java.sql.SQLException

releaseWithException

public void releaseWithException()
                          throws java.sql.SQLException
Specified by:
releaseWithException in interface Connector
Overrides:
releaseWithException in class DefaultConnector
Returns:
Throws:
java.sql.SQLException

toString

public java.lang.String toString()
Use for debug only

Overrides:
toString in class DefaultConnector

setOperatorConcat

public void setOperatorConcat(java.lang.String operatorConcat)
Set the operator for concatenation

Parameters:
operatorConcat - the operator

getOperatorConcat

public java.lang.String getOperatorConcat()
Get the operator for concatenation


setConversionFunction

public void setConversionFunction(java.lang.String sConversionFunction)
Set the conversion function


getConversionFunction

public java.lang.String getConversionFunction()
Get the conversion function


getWindowSize

public int getWindowSize()

setWindowSize

public void setWindowSize(int windowSize)

setDataSource

public void setDataSource(org.apache.commons.dbcp.BasicDataSource dataSource)


Copyright © 2004 sourceforge. All Rights Reserved.