All Downloads are FREE. Search and download functionalities are using the official Maven repository.

acolyte.ConnectionHandler Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
package acolyte;

/**
 * Connection handler.
 *
 * @author Cedric Chantepie
 * @see StatementHandler
 */
public interface ConnectionHandler {
    
    /**
     * Returns statement handler.
     */
    public StatementHandler getStatementHandler();

    //  --- Inner classes ---

    /**
     * Default implementation.
     */
    public static final class Default implements ConnectionHandler {
        final StatementHandler stmtHandler;

        /**
         * Bulk constructor.
         */
        public Default(final StatementHandler handler) {
            if (handler == null) {
                throw new IllegalArgumentException();
            } // end of if

            this.stmtHandler = handler;
        } // end of 

        /**
         * {@inheritDoc}
         */
        public StatementHandler getStatementHandler() {
            return this.stmtHandler;
        } // end of getStatementHandler
    } // end of class DefaultHandler
} // end of interface ConnectionHandler




© 2015 - 2024 Weber Informatics LLC | Privacy Policy