org.xquark.xml.xdbc
Interface XMLDataSource

All Known Implementing Classes:
Extractor

public interface XMLDataSource

The interface that every data source must implement. Classes implementing this interface can be instantiated either directly, or through the XMLDriverManager class.


Method Summary
 XMLConnection getConnection()
          Attempts to establish a connection with the data source.
 XMLConnection getConnection(java.lang.String user, java.lang.String password)
          Attempts to establish a connection with the data source.
 int getLoginTimeout()
          Gets the maximum time in seconds that the object can wait when attempting to log in to a data source
 java.io.PrintWriter getLogWriter()
          Retrieves the log writer currently used by the XDataSource object to print messages.
 void setLoginTimeout(int seconds)
          Sets the maximum time in seconds that the object will wait when attempting to log in to a data source.
 void setLogWriter(java.io.PrintWriter writer)
          Sets the logging/tracing java.io.PrintWriter object that is used by the XDataSource object.
 

Method Detail

getConnection

public XMLConnection getConnection()
                            throws XMLDBCException
Attempts to establish a connection with the data source.

Returns:
an XMLConnection object that represents a connection to the data source
Throws:
XMLDBCException - If a data source access error occurs

getConnection

public XMLConnection getConnection(java.lang.String user,
                                   java.lang.String password)
                            throws XMLDBCException
Attempts to establish a connection with the data source.

Parameters:
user - the data source registered user
password - the user's password
Returns:
an XMLConnection object that represents a connection to the data source
Throws:
XMLDBCException - If a data source access error occurs

setLogWriter

public void setLogWriter(java.io.PrintWriter writer)
Sets the logging/tracing java.io.PrintWriter object that is used by the XDataSource object.

Parameters:
writer - the new logging/tracing java.io.PrintWriter object, or null to disable logging and tracing

getLogWriter

public java.io.PrintWriter getLogWriter()
Retrieves the log writer currently used by the XDataSource object to print messages.

Returns:
the java.io.PrintWriter object used to log data source messages, or null if none is defined

setLoginTimeout

public void setLoginTimeout(int seconds)
Sets the maximum time in seconds that the object will wait when attempting to log in to a data source. Setting the timeout to 0 will disable it.

Parameters:
seconds - the login time limit in seconds

getLoginTimeout

public int getLoginTimeout()
Gets the maximum time in seconds that the object can wait when attempting to log in to a data source

Returns:
the data source login timeout in seconds, 0 if no timeout is defined


Copyright © 2004 Université de Versailles Saint-Quentin, XQuark Group. All rights reserved.