org.firebirdsql.gds.ng.wire

## Class WireServiceConnection

- java.lang.Object
- - org.firebirdsql.gds.ng.AbstractConnection<T,C>
  - - org.firebirdsql.gds.ng.wire.WireConnection<IServiceProperties,FbWireService>
    - - org.firebirdsql.gds.ng.wire.WireServiceConnection

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

      public class WireServiceConnection
      extends WireConnection<IServiceProperties,FbWireService>

  Wire connection instance for connecting to a service.
  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Field Summary

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

      `attachProperties`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WireServiceConnection(IServiceProperties serviceProperties)` Creates a WireServiceConnection (without establishing a connection to the server) with the default protocol collection.
    `WireServiceConnection(IServiceProperties serviceProperties, IEncodingFactory encodingFactory, ProtocolCollection protocols)` Creates a WireServiceConnection (without establishing a connection to the server).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected FbWireService` | `createConnectionHandle(ProtocolDescriptor protocolDescriptor)` Creates the connection handle for this type of connection.
    `protected java.lang.String` | `getCnctFile()`
    `protected DbAttachInfo` | `toDbAttachInfo(IServiceProperties attachProperties)`

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

      `clearAuthData, close, getAttachObjectName, getClientAuthBlock, 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 Detail

    - #### WireServiceConnection

          public WireServiceConnection(IServiceProperties serviceProperties)
                                throws java.sql.SQLException

      Creates a WireServiceConnection (without establishing a connection to the server) with the default protocol collection.
      Parameters:
        `serviceProperties` - Service properties
      Throws:
        `java.sql.SQLException`

    - #### WireServiceConnection

          public WireServiceConnection(IServiceProperties serviceProperties,
                                       IEncodingFactory encodingFactory,
                                       ProtocolCollection protocols)
                                throws java.sql.SQLException

      Creates a WireServiceConnection (without establishing a connection to the server).
      Parameters:
        `serviceProperties` - Service properties
        `encodingFactory` - Factory for encoding definitions
        `protocols` - The collection of protocols to use for this connection.
      Throws:
        `java.sql.SQLException`

  - ### Method Detail

    - #### getCnctFile

          protected java.lang.String getCnctFile()

      Overrides:
        `getCnctFile` in class `WireConnection<IServiceProperties,FbWireService>`
      Returns:
        The file name to use in the p_cnct_file of the op_connect request

    - #### toDbAttachInfo

          protected DbAttachInfo toDbAttachInfo(IServiceProperties attachProperties)
                                         throws java.sql.SQLException

      Specified by:
        `toDbAttachInfo` in class `WireConnection<IServiceProperties,FbWireService>`
      Throws:
        `java.sql.SQLException`

    - #### createConnectionHandle

          protected FbWireService createConnectionHandle(ProtocolDescriptor protocolDescriptor)

      Description copied from class: `WireConnection`
      Creates the connection handle for this type of connection.
      Specified by:
        `createConnectionHandle` in class `WireConnection<IServiceProperties,FbWireService>`
      Parameters:
        `protocolDescriptor` - The protocol descriptor selected by the identify phase
      Returns:
        Connection handle

Copyright © 2001-2025 Jaybird (Firebird JDBC) team. All rights reserved.