Package org.firebirdsql.gds.ng
Class AbstractConnection<T extends IAttachProperties<T>,C extends FbAttachment>
- java.lang.Object
- 
- org.firebirdsql.gds.ng.AbstractConnection<T,C>
 
- 
- Type Parameters:
- T- Type of attach properties
- C- Type of connection handle
 - Direct Known Subclasses:
- JnaConnection,- WireConnection
 
 public abstract class AbstractConnection<T extends IAttachProperties<T>,C extends FbAttachment> extends java.lang.ObjectAbstract class with common logic for connections.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected TattachProperties
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractConnection(T attachProperties, IEncodingFactory encodingFactory)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description DbCryptCallbackcreateDbCryptCallback()Creates an instance ofDbCryptCallbackfor this connection.java.lang.StringgetAttachObjectName()TgetAttachProperties()EncodinggetEncoding()EncodingDefinitiongetEncodingDefinition()IEncodingFactorygetEncodingFactory()intgetPortNumber()java.lang.StringgetServerName()abstract Cidentify()Performs the connection identification phase of the protocol and returns the connection handle implementation for the agreed protocol.
 
- 
- 
- 
Field Detail- 
attachPropertiesprotected final T extends IAttachProperties<T> attachProperties 
 
- 
 - 
Constructor Detail- 
AbstractConnectionprotected AbstractConnection(T attachProperties, IEncodingFactory encodingFactory) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 
- 
 - 
Method Detail- 
identifypublic abstract C identify() throws java.sql.SQLException Performs the connection identification phase of the protocol and returns the connection handle implementation for the agreed protocol.- Returns:
- Connection handle (ie FbDatabaseorFbService)
- Throws:
- java.sql.SQLException- For exceptions connecting
 
 - 
getServerNamepublic final java.lang.String getServerName() 
 - 
getPortNumberpublic final int getPortNumber() 
 - 
getAttachObjectNamepublic final java.lang.String getAttachObjectName() 
 - 
getAttachPropertiespublic final T getAttachProperties() - Returns:
- An immutable copy of the current attach properties.
 
 - 
getEncodingDefinitionpublic final EncodingDefinition getEncodingDefinition() 
 - 
getEncodingpublic final Encoding getEncoding() 
 - 
getEncodingFactorypublic final IEncodingFactory getEncodingFactory() 
 - 
createDbCryptCallback@InternalApi public final DbCryptCallback createDbCryptCallback() throws java.sql.SQLException Creates an instance ofDbCryptCallbackfor this connection.- Returns:
- Database encryption callback.
- Throws:
- java.sql.SQLException- For errors initializing the callback
 
 
- 
 
-