Package org.rhq.plugins.netservices.HTTPNetServiceComponent.ConfigKeys

Examples of org.rhq.plugins.netservices.HTTPNetServiceComponent.ConfigKeys.URL


     * @return
     * @throws org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException
     */
    static HTTPNetServiceComponentConfiguration createComponentConfiguration(Configuration pluginConfig) {

        URL endPointUrl = null;
        String configUrl = pluginConfig.getSimpleValue(URL, EMPTY_STRING);
        if (isBlank(configUrl)) {
            throw new InvalidPluginConfigurationException("Endpoint URL is not defined");
        }
        try {
            endPointUrl = new URL(configUrl);
        } catch (MalformedURLException e) {
            throw new InvalidPluginConfigurationException(configUrl + " is not a valid URL");
        }
        String protocol = endPointUrl.getProtocol();
        if (!protocol.equals("http") && !protocol.equals("https")) {
            throw new InvalidPluginConfigurationException(configUrl + "does not point to an http(s) resource");
        }

        HttpMethod httpMethod = null;
View Full Code Here

TOP

Related Classes of org.rhq.plugins.netservices.HTTPNetServiceComponent.ConfigKeys.URL

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.