Package com.xebialabs.overthere.spi

Examples of com.xebialabs.overthere.spi.OverthereConnectionBuilder


    private static OverthereConnection buildConnection(String protocol, ConnectionOptions options, AddressPortMapper mapper) {
        final Class<? extends OverthereConnectionBuilder> connectionBuilderClass = protocols.get().get(protocol);
        try {
            final Constructor<? extends OverthereConnectionBuilder> constructor = connectionBuilderClass.getConstructor(String.class, ConnectionOptions.class, AddressPortMapper.class);
            OverthereConnectionBuilder connectionBuilder = constructor.newInstance(protocol, options, mapper);

            if (!(connectionBuilder instanceof LocalConnection)) {
                logger.info("Connecting to {}", connectionBuilder);
            } else {
                logger.debug("Connecting to {}", connectionBuilder);
            }

            OverthereConnection connection = connectionBuilder.connect();

            logger.trace("Connected to {}", connection);
            return connection;
        } catch (NoSuchMethodException exc) {
            throw new IllegalStateException(connectionBuilderClass + " does not have a constructor that takes in a String and ConnectionOptions.", exc);
View Full Code Here

TOP

Related Classes of com.xebialabs.overthere.spi.OverthereConnectionBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.