|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.SIRAPRISE.client.DBConnection
public abstract class DBConnection
Class used to communicate between a program and the sira_prise dbms. When DBConnections are created, the following information must be provided :
parameter | Description. |
---|---|
host | The DNS identification of the host to connect to. It may either be its DNS name or its IP address in dotted decimal. |
port | The IP port to connect to. |
clientID | The identification of the client trying to connect. |
signatureAlgorithmNames | A set of Strings denoting Signature names that the client is willing and able to use in signing. |
initialAutoCommitForTransactions | A boolean flag indicating the default autoCommit setting that will be given to each transaction started on this connection. |
requestConnectionIdleTime | The idle time in milliseconds that the client requests for this connection. |
encryptionAlgorithmNames | A set of Strings denoting names of Cipher algorithms that the client is willing and able to use. |
signer | A callback object that will be called upon to compute signatures if and when message signing is used. |
Constructors exist in various combinations, possibly leaving out some of the items mentioned. In such cases, default values are used. These default values are configurable for the client in the DBCONNECTION.PROPERTIES file (see the DBConnectionProperties class for more information on where the client package searches for this file). The following table mentions the property name holding this default value for each optional field, and the value the client package will use in the absence of such a property.
Field | Property | Default if property absent |
---|---|---|
signatureAlgorithmNames | DEFAULTSIGNATUREALGORITHMNAMES (property value must be a comma-separated list of algorithm names) | SPS, MD5withRSA, MD2withRSA, SHA1withRSA, SHA1withDSA |
initialAutoCommitForTransactions | DEFAULTAUTOCOMMITFORTRANSACTIONS | False |
transationMode | TRANSACTIONSREADONLY (property value is a boolean ; required value for backward compatibility is 'False') | False |
requestConnectionIdleTime | DEFAULTCONNECTIONIDLETIME | 0 |
encryptionAlgorithmNames | DEFAULTENCRYPTIONALGORITHMNAMES (property value must be a comma-separated list of Cipher algorithm names | SPE |
Constructor Summary | |
---|---|
DBConnection(java.lang.String host,
int port,
java.util.Set<java.lang.String> signatureAlgorithmNames,
java.lang.String clientID,
boolean initialAutoCommitForTransactions,
long requestConnectionIdleTime,
java.util.Set<java.lang.String> encryptionAlgorithmNames,
Signer signer)
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.util.Set<java.lang.String> signatureAlgorithmNames,
java.lang.String clientID,
boolean initialAutoCommitForTransactions,
long requestConnectionIdleTime,
Signer signer)
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.util.Set<java.lang.String> signatureAlgorithmNames,
java.lang.String clientID,
boolean initialAutoCommitForTransactions,
java.util.Set<java.lang.String> encryptionAlgorithmNames,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.util.Set<java.lang.String> signatureAlgorithmNames,
java.lang.String clientID,
boolean initialAutoCommitForTransactions,
Signer privateKeyProvider)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.util.Set<java.lang.String> signatureAlgorithmNames,
java.lang.String clientID,
long requestConnectionIdleTime,
java.util.Set<java.lang.String> encryptionAlgorithmNames,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.util.Set<java.lang.String> signatureAlgorithmNames,
java.lang.String clientID,
long requestConnectionIdleTime,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.util.Set<java.lang.String> signatureAlgorithmNames,
java.lang.String clientID,
java.util.Set<java.lang.String> encryptionAlgorithmNames,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.util.Set<java.lang.String> signatureAlgorithmNames,
java.lang.String clientID,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.lang.String clientID,
boolean initialAutoCommitForTransactions,
long requestConnectionIdleTime,
java.util.Set<java.lang.String> encryptionAlgorithmNames,
Signer signer)
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.lang.String clientID,
boolean initialAutoCommitForTransactions,
long requestConnectionIdleTime,
Signer signer)
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.lang.String clientID,
boolean initialAutoCommitForTransactions,
java.util.Set<java.lang.String> encryptionAlgorithmNames,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.lang.String clientID,
boolean initialAutoCommitForTransactions,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.lang.String clientID,
long requestConnectionIdleTime,
java.util.Set<java.lang.String> encryptionAlgorithmNames,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.lang.String clientID,
long requestConnectionIdleTime,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.lang.String clientID,
java.util.Set<java.lang.String> encryptionAlgorithmNames,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
|
DBConnection(java.lang.String host,
int port,
java.lang.String clientID,
Signer signer)
Creates a connection to the server on the specified host and port, and opens it for communication. |
Method Summary | |
---|---|
abstract void |
close()
Closes the connection. |
void |
commit()
Deprecated. Use the commit() method of the DBTransaction object instead |
AbstractRelation |
compileAndCacheQuery(java.lang.String query)
Deprecated. use the compileAndCacheQuery() method from the DBTransaction instead |
AbstractRelation |
compileQuery(java.lang.String query)
Deprecated. use compileQuery() on the DBTransaction object (obtained from startTransaction()) instead. |
void |
endTransaction(boolean commit)
Deprecated. instead, use end() on the DBTransaction object obtained from startTransaction(). |
AbstractRelation |
execDmlCommand(java.lang.String cmd)
Deprecated. Use the execDmlCommand() method from the DBTransaction instead |
AbstractRelation |
execDmlCommandAndEndTransaction(java.lang.String cmd)
Deprecated. instead, use execDmlCommandAndEndTransaction() on the DBTransaction object obtained from startTransaction() |
AbstractRelation |
execMultipleStatement(java.util.Collection<?> commands)
Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction() |
AbstractRelation |
execMultipleStatement(java.lang.String[] commands)
Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction() |
AbstractRelation |
execMultipleStatementAndEndTransaction(java.util.Collection<?> commands)
Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction() |
AbstractRelation |
execMultipleStatementAndEndTransaction(java.lang.String[] commands)
Deprecated. replace this method by the execMultipleStatementAndEndTransaction() of the DBTransaction object obtained from startTransaction() |
AbstractRelation[] |
execQueries(java.lang.String[] expression)
Deprecated. replace this method by the execQueries() method of the DBTransaction object obtained from startTransaction() |
AbstractRelation[] |
execQueriesAndEndTransaction(java.lang.String[] expression)
Deprecated. replace this method by the execQueriesAndEndTransaction() method of the DBTransaction object obtained from startTransaction() |
AbstractRelation |
execQuery(java.lang.String expression)
Deprecated. replace this method by the execQuery() method of the DBTransaction object obtained from startTransaction() |
AbstractRelation |
execQueryAndEndTransaction(java.lang.String expression)
Deprecated. replace this method by the execQueryAndEndTransaction() method of the DBTransaction object obtained from startTransaction() |
boolean |
getDefaultTransactionAutoCommit()
Gets The default autocommit setting for all transactions created on this connection |
Version |
getSpecificationVersionForServer()
Gets The specification version to use in communications with the server |
static boolean |
isDefaultInitialAutoCommitForTransactions()
Gets defaultInitialAutoCommitForTransactions |
boolean |
isOpen()
Checks whether a connection is open |
void |
rollback()
Deprecated. Use the rollback() method of the DBTransaction object obtained from the connection instead |
void |
setDefaultTransactionAutoCommit(boolean autoCommit)
Sets The default autocommit setting for all transactions created on this connection |
DBTransaction |
startTransaction()
Starts an anonymous transaction on the connection with the default autocommit, transactionmode and ddl capture settings for transactions created on this connection |
DBTransaction |
startTransaction(boolean autoCommit)
Starts an anonymous transaction on the connection with the given autocommit setting |
DBTransaction |
startTransaction(boolean autoCommit,
DDLCapture ddlCapture)
Starts an anonymous transaction on the connection with the given autocommit and ddl capture settings |
DBTransaction |
startTransaction(boolean autoCommit,
TransactionMode transactionMode)
Starts an anonymous transaction in the given transaction mode on the connection with the given autocommit setting |
DBTransaction |
startTransaction(boolean autoCommit,
TransactionMode transactionMode,
DDLCapture ddlCapture)
Starts an anonymous transaction in the given transaction mode on the connection with the given autocommit setting |
DBTransaction |
startTransaction(DDLCapture ddlCapture)
Starts an anonymous transaction on the connection with the default autocommit and transactionmode settings for transactions created on this connection, and the given ddl capture setting |
DBTransaction |
startTransaction(java.lang.String userID,
boolean userAuthenticatedByClient,
java.lang.String signatureAlgorithm,
byte[] signature)
Starts a transaction on the connection with the default autocommit setting for transactions created on this connection |
DBTransaction |
startTransaction(java.lang.String userID,
boolean userAuthenticatedByClient,
java.lang.String signatureAlgorithm,
byte[] signature,
boolean autoCommit,
TransactionMode transactionMode)
Starts a transaction on the connection with the given autoCommit setting |
DBTransaction |
startTransaction(java.lang.String userID,
boolean userAuthenticatedByClient,
java.lang.String signatureAlgorithm,
byte[] signature,
boolean autoCommit,
TransactionMode transactionMode,
DDLCapture captureDDL)
Starts a transaction on the connection with the given autoCommit setting |
DBTransaction |
startTransaction(java.lang.String userID,
boolean userAuthenticatedByClient,
java.lang.String signatureAlgorithm,
byte[] signature,
DDLCapture ddlCapture)
Starts a transaction on the connection with the default autocommit setting for transactions created on this connection |
DBTransaction |
startTransaction(java.lang.String userID,
boolean userAuthenticatedByClient,
java.lang.String signatureAlgorithm,
byte[] signature,
TransactionMode transactionMode)
Starts a transaction on the connection with the default autocommit setting for transactions created on this connection |
DBTransaction |
startTransaction(java.lang.String userID,
boolean userAuthenticatedByClient,
java.lang.String signatureAlgorithm,
byte[] signature,
TransactionMode transactionMode,
DDLCapture ddlCapture)
Starts a transaction on the connection with the default autocommit setting for transactions created on this connection |
DBTransaction |
startTransaction(java.lang.String userID,
Signer userIDSigner)
Starts a transaction on the connection for the named user and with the default autocommit setting for transactions created on this connection. |
DBTransaction |
startTransaction(java.lang.String userID,
Signer userIDSigner,
boolean autoCommit)
Starts a transaction on the connection for the named user and with the default autocommit setting for transactions created on this connection. |
DBTransaction |
startTransaction(java.lang.String userID,
Signer userIDSigner,
boolean autoCommit,
TransactionMode transactionMode)
Starts a transaction in the given transaction mode on the connection for the named user and with the default autocommit setting for transactions created on this connection. |
DBTransaction |
startTransaction(java.lang.String userID,
Signer userIDSigner,
TransactionMode transactionMode)
Starts a transaction in the given read-only mode on the connection for the named user and with the default autocommit setting for transactions created on this connection. |
DBTransaction |
startTransaction(TransactionMode transactionMode)
Starts an anonymous transaction in the given transaction mode on the connection with the default autocommit setting for transactions created on this connection |
DBTransaction |
startTransaction(TransactionMode transactionMode,
DDLCapture ddlCapture)
Starts an anonymous transaction in the given transaction mode on the connection with the default autocommit setting for transactions created on this connection |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, boolean initialAutoCommitForTransactions, long requestConnectionIdleTime, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer) throws DBException, java.io.IOException, CommunicationProtocolException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.signatureAlgorithmNames
- a specified set of usable signature algorithm namesclientID
- The ID identifying the client of this connection to sira_priseinitialAutoCommitForTransactions
- true if the transactions created on this connection should have their autocommit set to truerequestConnectionIdleTime
- The requested time in milliseconds that the connection is allowed to stay idleencryptionAlgorithmNames
- A specified set of usable encryption protocol namessigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, boolean initialAutoCommitForTransactions, long requestConnectionIdleTime, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.signatureAlgorithmNames
- a specified set of usable signature algorithm namesclientID
- The ID identifying the client of this connection to sira_priseinitialAutoCommitForTransactions
- true if the transactions created on this connection should have their autocommit set to truerequestConnectionIdleTime
- The requested time in milliseconds that the connection is allowed to stay idlesigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, boolean initialAutoCommitForTransactions, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.signatureAlgorithmNames
- a specified set of usable signature algorithm namesclientID
- The userID identifying the user of this connection to sira_priseinitialAutoCommitForTransactions
- true if the transactions created on this connection should have their autocommit set to trueencryptionAlgorithmNames
- a specified set of usable encryption protocol namessigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, boolean initialAutoCommitForTransactions, Signer privateKeyProvider) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.signatureAlgorithmNames
- a specified set of usable signature algorithm namesclientID
- The userID identifying the user of this connection to sira_priseinitialAutoCommitForTransactions
- true if the transactions created on this connection should have their autocommit set to trueprivateKeyProvider
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, long requestConnectionIdleTime, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.signatureAlgorithmNames
- a specified set of usable signature algorithm namesclientID
- The userID identifying the user of this connection to sira_priserequestConnectionIdleTime
- The requested time in milliseconds that the connection is allowed to stay idleencryptionAlgorithmNames
- a specified set of usable encryption protocol namessigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, long requestConnectionIdleTime, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.signatureAlgorithmNames
- a specified set of usable signature algorithm namesclientID
- The userID identifying the user of this connection to sira_priserequestConnectionIdleTime
- The requested time in milliseconds that the connection is allowed to stay idlesigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.signatureAlgorithmNames
- a specified set of usable signature algorithm namesclientID
- The userID identifying the user of this connection to sira_priseencryptionAlgorithmNames
- a specified set of usable encryption protocol namessigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.util.Set<java.lang.String> signatureAlgorithmNames, java.lang.String clientID, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.signatureAlgorithmNames
- a specified set of usable signature algorithm namesclientID
- The userID identifying the user of this connection to sira_prisesigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.lang.String clientID, boolean initialAutoCommitForTransactions, long requestConnectionIdleTime, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.clientID
- The ID identifying the client of this connection to sira_priseinitialAutoCommitForTransactions
- true if the transactions created on this connection should have their autocommit set to truerequestConnectionIdleTime
- The requested time in milliseconds that the connection is allowed to stay idleencryptionAlgorithmNames
- A specified set of usable encryption protocol namessigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.lang.String clientID, boolean initialAutoCommitForTransactions, long requestConnectionIdleTime, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.clientID
- The ID identifying the client of this connection to sira_priseinitialAutoCommitForTransactions
- true if the transactions created on this connection should have their autocommit set to truerequestConnectionIdleTime
- The requested time in milliseconds that the connection is allowed to stay idlesigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.lang.String clientID, boolean initialAutoCommitForTransactions, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.clientID
- The userID identifying the user of this connection to sira_priseinitialAutoCommitForTransactions
- true if the transactions created on this connection should have their autocommit set to trueencryptionAlgorithmNames
- a specified set of usable encryption protocol namessigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.lang.String clientID, boolean initialAutoCommitForTransactions, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.clientID
- The userID identifying the user of this connection to sira_priseinitialAutoCommitForTransactions
- true if the transactions created on this connection should have their autocommit set to truesigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.lang.String clientID, long requestConnectionIdleTime, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.clientID
- The userID identifying the user of this connection to sira_priserequestConnectionIdleTime
- The requested time in milliseconds that the connection is allowed to stay idleencryptionAlgorithmNames
- a specified set of usable encryption protocol namessigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.lang.String clientID, long requestConnectionIdleTime, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.clientID
- The userID identifying the user of this connection to sira_priserequestConnectionIdleTime
- The requested time in milliseconds that the connection is allowed to stay idlesigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.lang.String clientID, java.util.Set<java.lang.String> encryptionAlgorithmNames, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.clientID
- The userID identifying the user of this connection to sira_priseencryptionAlgorithmNames
- a specified set of usable encryption protocol namessigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakepublic DBConnection(java.lang.String host, int port, java.lang.String clientID, Signer signer) throws java.io.IOException, CommunicationProtocolException, DBException
host
- The identification of the host. It may either be its DNS name or its IP address in dotted decimal.port
- The port to which to connect.clientID
- The userID identifying the user of this connection to sira_prisesigner
- The Signer object that will be called upon to compute the needed signature
java.io.IOException
- if an I/O error occurs when creating the TCP socket.
CommunicationProtocolException
- If an unexpected message was received during the handshake
DBException
- If an error was detected on the server during the handshakeMethod Detail |
---|
public static final boolean isDefaultInitialAutoCommitForTransactions()
public abstract void close()
public void commit() throws ConnectionClosedException
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation compileAndCacheQuery(java.lang.String query) throws DBException, ConnectionClosedException
query
- the query to be compiled-and-cached, in textual form.
DBException
- If the connection has already been closed, no transaction was started, or an error was found in the compilation.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation compileQuery(java.lang.String query) throws DBException, ConnectionClosedException
query
- the query to be verified, in textual form.
DBException
- If the connection has already been closed, no transaction was started, or an error was found in the compilation.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic void endTransaction(boolean commit) throws ConnectionClosedException
commit
- true if the transaction is to be committed, false if it is to be rolled back.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation execDmlCommand(java.lang.String cmd) throws DBException, ConnectionClosedException
cmd
- the command to be executed, in textual form.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation execDmlCommandAndEndTransaction(java.lang.String cmd) throws DBException, ConnectionClosedException
cmd
- the command to be executed, in textual form.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation execMultipleStatement(java.util.Collection<?> commands) throws DBException, ConnectionClosedException
commands
- The commands to be executed. Execution is in the obvious order, and thus not randomly, or in reverse order, or whatever.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation execMultipleStatement(java.lang.String[] commands) throws DBException, ConnectionClosedException
commands
- The single-assignment commands to be executed. Execution is in the obvious order, and thus not randomly, or in reverse order, or whatever.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation execMultipleStatementAndEndTransaction(java.util.Collection<?> commands) throws DBException, ConnectionClosedException
commands
- The commands to be executed. Execution is in the obvious order, and thus not randomly, or in reverse order, or whatever.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation execMultipleStatementAndEndTransaction(java.lang.String[] commands) throws DBException, ConnectionClosedException
commands
- The single-assignment commands to be executed. Execution is in the obvious order, and thus not randomly, or in reverse order, or whatever.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation[] execQueries(java.lang.String[] expression) throws DBException, ConnectionClosedException
expression
- The expressions of the relational algebra to be inquired.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation[] execQueriesAndEndTransaction(java.lang.String[] expression) throws DBException, ConnectionClosedException
expression
- The expressions of the relational algebra to be inquired.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation execQuery(java.lang.String expression) throws DBException, ConnectionClosedException
expression
- The expression of the relational algebra to be inquired.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic AbstractRelation execQueryAndEndTransaction(java.lang.String expression) throws DBException, ConnectionClosedException
expression
- The expression of the relational algebra to be inquired.
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic boolean getDefaultTransactionAutoCommit()
public final Version getSpecificationVersionForServer()
public boolean isOpen()
public void rollback() throws DBException, ConnectionClosedException
DBException
- If the connection has already been closed, no transaction was started, or an error was found.
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the serverpublic void setDefaultTransactionAutoCommit(boolean autoCommit)
autoCommit
- The new default autocommit setting for all transactions created on this connectionpublic final DBTransaction startTransaction() throws ConnectionClosedException, ErrorMessageException
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(boolean autoCommit) throws ConnectionClosedException, ErrorMessageException
autoCommit
- The autoCommit setting for the transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(boolean autoCommit, DDLCapture ddlCapture) throws ConnectionClosedException, ErrorMessageException
autoCommit
- The autoCommit setting for the transactionddlCapture
- Flag indicating whether DDL capture is to be used in this transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(boolean autoCommit, TransactionMode transactionMode) throws ConnectionClosedException, ErrorMessageException
autoCommit
- The autoCommit setting for the transactiontransactionMode
- The transaction mode
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(boolean autoCommit, TransactionMode transactionMode, DDLCapture ddlCapture) throws ConnectionClosedException, ErrorMessageException
autoCommit
- The autoCommit setting for the transactiontransactionMode
- The transaction modeddlCapture
- Flag indicating whether DDL capture is to be used in this transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(DDLCapture ddlCapture) throws ConnectionClosedException, ErrorMessageException
ddlCapture
- Flag indicating whether DDL capture is to be used in this transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature) throws ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserAuthenticatedByClient
- true if the user has been authenticated by the clientsignatureAlgorithm
- The name of the signature algorithm that can be used by the server to verify the authenticity of the userIDsignature
- the user's signature
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, boolean autoCommit, TransactionMode transactionMode) throws ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserAuthenticatedByClient
- true if the user has been authenticated by the clientsignatureAlgorithm
- The name of the signature algorithm that can be used by the server to verify the authenticity of the userIDsignature
- the user's signatureautoCommit
- The autoCommit setting for the transactiontransactionMode
- the mode for the transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, boolean autoCommit, TransactionMode transactionMode, DDLCapture captureDDL) throws ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserAuthenticatedByClient
- true if the user has been authenticated by the clientsignatureAlgorithm
- The name of the signature algorithm that can be used by the server to verify the authenticity of the userIDsignature
- the user's signatureautoCommit
- The autoCommit setting for the transactiontransactionMode
- the mode for the transactioncaptureDDL
- Flag indicating whether DDL capture is to be used in this transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, DDLCapture ddlCapture) throws ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserAuthenticatedByClient
- true if the user has been authenticated by the clientsignatureAlgorithm
- The name of the signature algorithm that can be used by the server to verify the authenticity of the userIDsignature
- the user's signatureddlCapture
- Flag indicating whether DDL capture is to be used in this transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, TransactionMode transactionMode) throws ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserAuthenticatedByClient
- true if the user has been authenticated by the clientsignatureAlgorithm
- The name of the signature algorithm that can be used by the server to verify the authenticity of the userIDsignature
- the user's signaturetransactionMode
- The transaction mode
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(java.lang.String userID, boolean userAuthenticatedByClient, java.lang.String signatureAlgorithm, byte[] signature, TransactionMode transactionMode, DDLCapture ddlCapture) throws ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserAuthenticatedByClient
- true if the user has been authenticated by the clientsignatureAlgorithm
- The name of the signature algorithm that can be used by the server to verify the authenticity of the userIDsignature
- the user's signaturetransactionMode
- The transaction modeddlCapture
- Flag indicating whether DDL capture is to be used in this transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(java.lang.String userID, Signer userIDSigner) throws DBException, ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserIDSigner
- The Signer object that will be called upon to compute the needed signature
DBException
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(java.lang.String userID, Signer userIDSigner, boolean autoCommit) throws DBException, ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserIDSigner
- The Signer object that will be called upon to compute the needed signatureautoCommit
- The autoCommit setting for the transaction
DBException
ConnectionClosedException
ErrorMessageException
public final DBTransaction startTransaction(java.lang.String userID, Signer userIDSigner, boolean autoCommit, TransactionMode transactionMode) throws DBException, ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserIDSigner
- The Signer object that will be called upon to compute the needed signatureautoCommit
- The autoCommit setting for the transactiontransactionMode
- The transaction mode
DBException
ConnectionClosedException
ErrorMessageException
public final DBTransaction startTransaction(java.lang.String userID, Signer userIDSigner, TransactionMode transactionMode) throws DBException, ConnectionClosedException, ErrorMessageException
userID
- The identification of the user starting the transactionuserIDSigner
- The Signer object that will be called upon to compute the needed signaturetransactionMode
- The transaction mode
DBException
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(TransactionMode transactionMode) throws ConnectionClosedException, ErrorMessageException
transactionMode
- The transaction mode
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message insteadpublic final DBTransaction startTransaction(TransactionMode transactionMode, DDLCapture ddlCapture) throws ConnectionClosedException, ErrorMessageException
transactionMode
- The transaction modeddlCapture
- Flag indicating whether DDL capture is to be used in this transaction
ConnectionClosedException
- If the connection was closed due to an I/O error that occurred during communication with the server
ErrorMessageException
- If the response obtained from the server was not a confirmation, but an error message instead
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |