Package org.openbel.framework.core.protocol.handler

Examples of org.openbel.framework.core.protocol.handler.ProtocolHandler


            final String url = downloadLocation;
            final String msg = "No protocol for " + protocol;
            throw new ResourceDownloadError(url, msg);
        }

        ProtocolHandler protocolHandler = null;
        switch (supportedProtocol) {
        case FILE:
            protocolHandler = new FileProtocolHandler();
            break;
        case HTTP:
            protocolHandler = new HttpProtocolHandler();
            break;
        case HTTPS:
            protocolHandler = new HttpsProtocolHandler();
            break;
        case SFTP:
            protocolHandler = new SftpProtocolHandler();
            break;
        case FTP:
            protocolHandler = new FTPProtocolHandler();
            break;
        default:
            final String url = downloadLocation;
            final String msg = "No case for " + supportedProtocol;
            throw new ResourceDownloadError(url, msg);
        }

        return protocolHandler.downloadResource(resourceLocation,
                downloadLocation);
    }
View Full Code Here

TOP

Related Classes of org.openbel.framework.core.protocol.handler.ProtocolHandler

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.