Package org.wso2.carbon.cloud.csg.common

Examples of org.wso2.carbon.cloud.csg.common.CSGException


    public CSGProxyService getCSGServiceProxy()
            throws CSGException {
        if (CSGConstant.JMS_MODE_OF_OPERATION.equals(operationMode)) {
            return new JMSCSGProxyService();
        } else {
            throw new CSGException("Operation mode " + operationMode + " doesn't support. Only a JMS based" +
                    " model is supported");
        }
    }
View Full Code Here


                replace(CSGConstant.CSG_AMQP_PASSWORD, passWord);
    }

    private void handleException(String msg) throws CSGException {
        log.error(msg);
        throw new CSGException(msg);
    }
View Full Code Here

        throw new CSGException(msg);
    }

    private void handleException(String msg, Throwable t) throws CSGException {
        log.error(msg, t);
        throw new CSGException(msg, t);
    }
View Full Code Here

        }
    }

    private void handleException(String msg, Throwable t) throws CSGException {
        log.error(msg, t);
        throw new CSGException(msg, t);
    }
View Full Code Here

        throw new CSGException(msg, t);
    }

    private void handleException(String msg) throws CSGException {
        log.error(msg);
        throw new CSGException(msg);
    }
View Full Code Here

                    resource.getProperty(CSGConstant.PASS_WORD)));
            bean.setPassWord(plainPassWord);

            return bean;
        } catch (CryptoException e) {
            throw new CSGException("Cloud not get the CSG server information from the resource: " +
                    resource,e);
        }
    }
View Full Code Here

                    csgServer.getPassWord().getBytes()));

            registry.put(CSGConstant.REGISTRY_SERVER_RESOURCE_PATH + "/" + csgServer.getName(),
                    resource);
        } catch (Exception e) {
            throw new CSGException("Error occurred while saving the content into registry", e);
        }
    }
View Full Code Here

        return f.exists();
    }

    public static OMNode getOMElementFromURI(String wsdlURI) throws CSGException {
        if (wsdlURI == null || "null".equals(wsdlURI)) {
            throw new CSGException("Can't create URI from a null value");
        }
        URL url;
        try {
            url = new URL(wsdlURI);
        } catch (MalformedURLException e) {
            throw new CSGException("Invalid URI reference '" + wsdlURI + "'");
        }
        URLConnection connection;
        connection = getURLConnection(url);
        if (connection == null) {
            throw new CSGException("Cannot create a URLConnection for given URL : " + url);
        }
        connection.setReadTimeout(getReadTimeout());
        connection.setConnectTimeout(getConnectTimeout());
        connection.setRequestProperty("Connection", "close"); // if http is being used
        InputStream inStream = null;
View Full Code Here

            return omFactory.createOMText(
                    new DataHandler(new SynapseBinaryDataSource(newInputStream,
                            newConnection.getContentType())), true);

        } catch (IOException e) {
            throw  new CSGException("Error when getting a stream from resource's content", e);
        }
    }
View Full Code Here

    private static URLConnection getURLConnection(URL url) throws CSGException {
        URLConnection connection;
        if (url.getProtocol().equalsIgnoreCase("https")) {
            String msg = "Connecting through doesn't support";
            log.error(msg);
            throw new CSGException(msg);
        } else {
            try {
                connection = url.openConnection();
            } catch (IOException e) {
                throw new CSGException("Cloud not open the URL connection", e);
            }
        }
        connection.setReadTimeout(getReadTimeout());
        connection.setConnectTimeout(getConnectTimeout());
        connection.setRequestProperty("Connection", "close"); // if http is being used
View Full Code Here

TOP

Related Classes of org.wso2.carbon.cloud.csg.common.CSGException

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.