Documentation of 'org.apache.derby.client.net.NetConnection' Java class
NetConnection
org.apache.derby.client.net

Class NetConnection

    • Method Detail

      • getSQLAM

        public int getSQLAM()
      • getAGENT

        public int getAGENT()
      • getCMNTCPIP

        public int getCMNTCPIP()
      • getRDB

        public int getRDB()
      • getSECMGR

        public int getSECMGR()
      • getXAMGR

        public int getXAMGR()
      • getSYNCPTMGR

        public int getSYNCPTMGR()
      • getRSYNCMGR

        public int getRSYNCMGR()
      • setInputStream

        public void setInputStream(java.io.InputStream inputStream)
      • setOutputStream

        public void setOutputStream(java.io.OutputStream outputStream)
      • getInputStream

        public java.io.InputStream getInputStream()
      • getOutputStream

        public java.io.OutputStream getOutputStream()
      • setIndoubtTransactions

        public void setIndoubtTransactions(java.util.List<javax.transaction.xa.Xid> indoubtTransactions)
      • getSecurityMechanism

        public int getSecurityMechanism()
      • getTargetPublicKey

        public byte[] getTargetPublicKey()
      • getProductID

        public java.lang.String getProductID()
      • isConnectionNull

        public final boolean isConnectionNull()
        Returns:
        Returns the connectionNull.
      • setConnectionNull

        public void setConnectionNull(boolean connectionNull)
        Parameters:
        connectionNull - The connectionNull to set.
      • serverSupportsLayerBStreaming

        public final boolean serverSupportsLayerBStreaming()
      • serverSupportLongRDBNAM

        public final boolean serverSupportLongRDBNAM()
      • isOpen

        public boolean isOpen()
        Returns if a transaction is in process
        Returns:
        open
      • createArrayOf

        public java.sql.Array createArrayOf(java.lang.String typeName,
                                            java.lang.Object[] elements)
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • createNClob

        public java.sql.NClob createNClob()
                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • createSQLXML

        public java.sql.SQLXML createSQLXML()
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • createStruct

        public java.sql.Struct createStruct(java.lang.String typeName,
                                            java.lang.Object[] attributes)
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • isValid

        public boolean isValid(int timeout)
                        throws java.sql.SQLException
        Checks if the connection has not been closed and is still valid. The validity is checked by running a simple query against the database. The timeout specified by the caller is implemented as follows: On the server: uses the queryTimeout functionality to make the query time out on the server in case the server has problems or is highly loaded. On the client: uses a timeout on the socket to make sure that the client is not blocked forever in the cases where the server is "hanging" or not sending the reply.
        Parameters:
        timeout - The time in seconds to wait for the database operation used to validate the connection to complete. If the timeout period expires before the operation completes, this method returns false. A value of 0 indicates a timeout is not applied to the database operation.
        Returns:
        true if the connection is valid, false otherwise
        Throws:
        java.sql.SQLException - if the parameter value is illegal or if a database error has occurred
      • close

        public void close()
                   throws java.sql.SQLException
        Close the connection and release its resources.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.sql.Connection
        Overrides:
        close in class ClientConnection
        Throws:
        java.sql.SQLException - if a database-access error occurs.
      • setClientInfo

        public void setClientInfo(java.lang.String name,
                                  java.lang.String value)
                           throws java.sql.SQLClientInfoException
        setClientInfo will always throw a SQLClientInfoException since Derby does not support any properties.
        Parameters:
        name - a property key String
        value - a property value String
        Throws:
        java.sql.SQLClientInfoException - always.
      • setClientInfo

        public void setClientInfo(java.util.Properties properties)
                           throws java.sql.SQLClientInfoException
        setClientInfo will throw a SQLClientInfoException unless the properties parameter is empty, since Derby does not support any properties. All the property keys in the properties parameter are added to failedProperties of the exception thrown, with REASON_UNKNOWN_PROPERTY as the value.
        Parameters:
        properties - a Properties object with the properties to set.
        Throws:
        java.sql.SQLClientInfoException - unless the properties parameter is null or empty.
      • getClientInfo

        public java.lang.String getClientInfo(java.lang.String name)
                                       throws java.sql.SQLException
        getClientInfo always returns a null String since Derby doesn't support ClientInfoProperties.
        Parameters:
        name - a String value
        Returns:
        a null String value
        Throws:
        java.sql.SQLException - if the connection is closed.
      • getClientInfo

        public java.util.Properties getClientInfo()
                                           throws java.sql.SQLException
        getClientInfo always returns an empty Properties object since Derby doesn't support ClientInfoProperties.
        Returns:
        an empty Properties object.
        Throws:
        java.sql.SQLException - if the connection is closed.
      • isWrapperFor

        public boolean isWrapperFor(java.lang.Class<?> interfaces)
                             throws java.sql.SQLException
        Returns false unless interfaces is implemented
        Parameters:
        interfaces - a Class defining an interface.
        Returns:
        true if this implements the interface or directly or indirectly wraps an object that does.
        Throws:
        java.sql.SQLException - if an error occurs while determining whether this is a wrapper for an object with the given interface.
      • unwrap

        public <T> T unwrap(java.lang.Class<T> interfaces)
                     throws java.sql.SQLException
        Returns this if this class implements the interface
        Parameters:
        interfaces - a Class defining an interface
        Returns:
        an object that implements the interface
        Throws:
        java.sql.SQLException - if no object if found that implements the interface

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.