Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng.wire

# Class WireDatabaseConnection

java.lang.Object
org.firebirdsql.gds.ng.AbstractConnection<T,C>
org.firebirdsql.gds.ng.wire.WireConnection<IConnectionProperties,FbWireDatabase>
org.firebirdsql.gds.ng.wire.WireDatabaseConnection

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public final class WireDatabaseConnection extends WireConnection<IConnectionProperties,FbWireDatabase>
Wire connection instance for connecting to a database

Since:
  3.0
Author:
  Mark Rotteveel

## Field Summary

### Fields inherited from class org.firebirdsql.gds.ng.AbstractConnection

`attachProperties`

## Constructor Summary

Constructors
Constructor
Description
`WireDatabaseConnection(IConnectionProperties connectionProperties)`
Creates a WireDatabaseConnection (without establishing a connection to the server) with the default protocol collection.
`WireDatabaseConnection(IConnectionProperties connectionProperties, IEncodingFactory encodingFactory, ProtocolCollection protocols)`
Creates a WireDatabaseConnection (without establishing a connection to the server).

## Method Summary

Modifier and Type
Method
Description
`protected FbWireDatabase`
`createConnectionHandle(ProtocolDescriptor protocolDescriptor)`
Creates the connection handle for this type of connection.
`protected DbAttachInfo`
`toDbAttachInfo(IConnectionProperties attachProperties)`

### Methods inherited from class org.firebirdsql.gds.ng.wire.WireConnection

`clearAuthData, close, getAttachObjectName, getClientAuthBlock, getCnctFile, getPortNumber, getProtocolArchitecture, getProtocolMinimumType, getProtocolVersion, getServerName, getXdrStreamAccess, identify, isConnected, readNextOperation, resetSocketTimeout, setSoTimeout, socketConnect, writeDirect`

### Methods inherited from class org.firebirdsql.gds.ng.AbstractConnection

`createDbCryptCallback, getAttachProperties, getEncoding, getEncodingDefinition, getEncodingFactory, isLockedByCurrentThread, withLock`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WireDatabaseConnection

public WireDatabaseConnection(IConnectionProperties connectionProperties) throws SQLException
Creates a WireDatabaseConnection (without establishing a connection to the server) with the default protocol collection.

Parameters:
  `connectionProperties` - Connection properties
Throws:
  `SQLException`

### WireDatabaseConnection

public WireDatabaseConnection(IConnectionProperties connectionProperties, IEncodingFactory encodingFactory, ProtocolCollection protocols) throws SQLException
Creates a WireDatabaseConnection (without establishing a connection to the server).

Parameters:
  `connectionProperties` - Connection properties
  `encodingFactory` - Factory for encoding definitions
  `protocols` - The collection of protocols to use for this connection.
Throws:
  `SQLException`

## Method Details

### toDbAttachInfo

protected DbAttachInfo toDbAttachInfo(IConnectionProperties attachProperties) throws SQLException

Specified by:
  `toDbAttachInfo` in class `WireConnection<IConnectionProperties,FbWireDatabase>`
Throws:
  `SQLException`

### createConnectionHandle

protected FbWireDatabase createConnectionHandle(ProtocolDescriptor protocolDescriptor)
Description copied from class: `WireConnection`
Creates the connection handle for this type of connection.

Specified by:
  `createConnectionHandle` in class `WireConnection<IConnectionProperties,FbWireDatabase>`
Parameters:
  `protocolDescriptor` - The protocol descriptor selected by the identify phase
Returns:
  Connection handle