|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
gov.virginia.dcjs.jini.service.GenericService
gov.virginia.dcjs.server.TCPServer
gov.virginia.dcjs.server.TCPdbServer
| Field Summary | |
static int |
ACCESS
Constant for MS Access data sources |
static int |
FOXPRO
Constant for MS FoxPro data sources |
static int |
SQL
Constant for MS SQL Server data sources |
static int |
UNKNOWN
Constant for unknown data sources |
| Fields inherited from class gov.virginia.dcjs.jini.service.GenericService |
r_name |
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
TCPdbServer(int port,
TCPMain main,
java.lang.String dbRead,
java.lang.String dbWrite,
int dbType)
Build a server connected to the specified data source of the * specified database type and listenning on the specified port * @param port Port this server will listen on * @param main Control interface object for this server * @param dbRead Read Only ODBC datasource name * @param dbWrite Read/Write ODBC datasource name * @param dbType One of the class constants {ACCESS, FOXPRO, SQL} |
|
| Method Summary | |
java.sql.Connection |
getConnection()
Used by SQLRequest classes to access the database * @return Established JDBC Write connection * @deprecated Explicitly call getReadConnection() or
* getWriteConnection() instead. |
java.lang.String |
getCurrentDate(boolean andTime)
Provides the appropriate RDBMS function name for the current date/datetime * @param andTime True to return date and time function (not just date). |
int |
getRDBMS()
Obtain the type of database engine being used * @return One of the class constants {ACCESS, FOXPRO} |
java.sql.Connection |
getReadConnection()
Used by SQLRequest classes to access the Read Only data source * @return Established JDBC Read Only connection |
java.sql.Connection |
getWriteConnection()
Used by SQLRequest classes to access the Writable data source * @return Established JDBC Write connection |
static void |
odbcQueue(SQLRequest sql)
Synchronizing method for multiple JDBC requests over the single connection |
void |
setDbSources(java.lang.String dbRead,
java.lang.String dbWrite)
Specify the ODBC datasource name for this server * @param dbRead Read Only ODBC datasource name * @param dbWrite Read/Write ODBC datasource name |
void |
setRDBMS(int dbType)
Provide the database engine type this server uses * @param dbType One of the class constants {ACCESS, FOXPRO} |
void |
startServer()
Initialized socket listenning and JDBC communication |
void |
stopServer()
Halts the server processing |
| Methods inherited from class gov.virginia.dcjs.server.TCPServer |
finalize, getConfiguration, getPort, getSocket, logWrite, run, serveClient, start, stop |
| Methods inherited from class gov.virginia.dcjs.jini.service.GenericService |
destroy, getAdmin, initializeServiceName, serviceIDNotify |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.jini.admin.Administrable |
getAdmin |
| Field Detail |
public static final int UNKNOWN
public static final int ACCESS
public static final int FOXPRO
public static final int SQL
| Constructor Detail |
public TCPdbServer(int port,
TCPMain main,
java.lang.String dbRead,
java.lang.String dbWrite,
int dbType)
| Method Detail |
public void setDbSources(java.lang.String dbRead,
java.lang.String dbWrite)
public int getRDBMS()
public void setRDBMS(int dbType)
public java.lang.String getCurrentDate(boolean andTime)
public void startServer()
throws java.io.IOException
java.io.IOExceptionpublic java.sql.Connection getConnection()
getReadConnection() or
* getWriteConnection() instead.
public java.sql.Connection getReadConnection()
public java.sql.Connection getWriteConnection()
public static void odbcQueue(SQLRequest sql)
throws java.sql.SQLException
sql - One of the SQLRequest objects under the 'See Also' section
java.sql.SQLExceptionSQLSelectRequest,
SQLInsertRequest,
SQLUpdateRequest,
SQLDeleteRequestpublic void stopServer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||