be.SIRAPRISE.client
Class OneShotDBConnection

java.lang.Object
  extended by be.SIRAPRISE.client.DBConnection
      extended by be.SIRAPRISE.client.OneShotDBConnection

public final class OneShotDBConnection
extends DBConnection

A OneShotDBConnection has all the semantics of a DBConnection. The close() method actually closes the connection, such that the connection cannot be recycled for reuse in the context of a connection pool.

Author:
Erwin

Constructor Summary
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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.
OneShotDBConnection(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
 void close()
          Closes the connection.
 
Methods inherited from class be.SIRAPRISE.client.DBConnection
commit, compileAndCacheQuery, compileQuery, endTransaction, execDmlCommand, execDmlCommandAndEndTransaction, execMultipleStatement, execMultipleStatement, execMultipleStatementAndEndTransaction, execMultipleStatementAndEndTransaction, execQueries, execQueriesAndEndTransaction, execQuery, execQueryAndEndTransaction, getDefaultTransactionAutoCommit, getSpecificationVersionForServer, isDefaultInitialAutoCommitForTransactions, isOpen, rollback, setDefaultTransactionAutoCommit, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction, startTransaction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneShotDBConnection

public OneShotDBConnection(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 java.io.IOException,
                           CommunicationProtocolException,
                           DBException
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.

Parameters:
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 names
clientID - The ID identifying the client of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
encryptionAlgorithmNames - A specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.

Parameters:
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 names
clientID - The ID identifying the client of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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 names
clientID - The ID identifying the client of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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 names
clientID - The ID identifying the client of this connection to sira_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
privateKeyProvider - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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 names
clientID - The ID identifying the client of this connection to sira_prise
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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 names
clientID - The ID identifying the client of this connection to sira_prise
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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 names
clientID - The ID identifying the client of this connection to sira_prise
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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 names
clientID - The ID identifying the client of this connection to sira_prise
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.

Parameters:
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_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
encryptionAlgorithmNames - A specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(java.lang.String host,
                           int port,
                           java.lang.String clientID,
                           boolean initialAutoCommitForTransactions,
                           long requestConnectionIdleTime,
                           Signer signer)
                    throws java.io.IOException,
                           CommunicationProtocolException,
                           DBException
Creates a connection to the server on the specified host and port with the given autoCommit setting, and opens it for communication.

Parameters:
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_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(java.lang.String host,
                           int port,
                           java.lang.String clientID,
                           boolean initialAutoCommitForTransactions,
                           Signer signer)
                    throws java.io.IOException,
                           CommunicationProtocolException,
                           DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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_prise
initialAutoCommitForTransactions - true if the transactions created on this connection should have their autocommit set to true
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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_prise
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(java.lang.String host,
                           int port,
                           java.lang.String clientID,
                           long requestConnectionIdleTime,
                           Signer signer)
                    throws java.io.IOException,
                           CommunicationProtocolException,
                           DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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_prise
requestConnectionIdleTime - The requested time in milliseconds that the connection is allowed to stay idle
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(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
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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_prise
encryptionAlgorithmNames - a specified set of usable encryption protocol names
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake

OneShotDBConnection

public OneShotDBConnection(java.lang.String host,
                           int port,
                           java.lang.String clientID,
                           Signer signer)
                    throws java.io.IOException,
                           CommunicationProtocolException,
                           DBException
Creates a connection to the server on the specified host and port, and opens it for communication. AutoCommit will be OFF. The requested connection idle time is the default time configured in the client properties.

Parameters:
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_prise
signer - The Signer object that will be called upon to compute the needed signature
Throws:
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 handshake
Method Detail

close

public void close()
Description copied from class: DBConnection
Closes the connection. If an uncommitted transaction is still pending on the connection, it will be rolled back and ended.

Specified by:
close in class DBConnection