Class BaseConnection<C extends ConnectorContext>

    • Constructor Detail

      • BaseConnection

        public BaseConnection​(C context)
        Creates a new instance using the specified context. The context is required.
    • Method Detail

      • getContext

        public C getContext()
        Returns the context used to create this connection
        Returns:
        the context
      • getOperationContext

        @Deprecated
        public OperationContext getOperationContext()
        Deprecated.
        This has been deprecated due to inherent type safety concerns since instances can be created with any context (not necessarily an operation context). The getContext() method can now be used to access an operation context in a type safe way.
        Returns the operation context for this connection.
        Returns:
        the operation context
      • getConnector

        public Connector getConnector()
        Returns the connector instance with which this context is associated.
        Returns:
        the connector
      • generateConnectionInfo

        public String generateConnectionInfo()
        Returns the connection information used for logging.

        The default implementation returns null. Subclasses may wish to override this implementation to return specific connection information that will be used for logging purposes.

      • generateConnectionInfo

        protected String generateConnectionInfo​(String user,
                                                String url)