Package com.emc.vipr.client.exceptions

Examples of com.emc.vipr.client.exceptions.ViPRException


     *
     * @param port Target port.
     */
    public void setPort(int port) {
        if (port <=0 || port > 65535) {
            throw new ViPRException("Port specified is not a valid port");
        }
        this.port = port;
    }
View Full Code Here


     *
     * @param protocol HTTP Protocol.
     */
    public void setProtocol(String protocol) {
        if (protocol == null) {
            throw new ViPRException("Protocol must not be null");
        }
        if (!(protocol.equals("https") || protocol.equals("http"))) {
            throw new ViPRException("Protocol must be 'http' or 'https'");
        }
        this.protocol = protocol;
    }
View Full Code Here

     *
     * @param bulkSize Number of items to retrieve per bulk request. Maximum is 4000.
     */
    public void setBulkSize(int bulkSize) {
        if (bulkSize < 1 || bulkSize > 4000) {
            throw new ViPRException("BulkSize must be between 1 and 4000 inclusive");
        }
        this.bulkSize = bulkSize;
    }
View Full Code Here

            return getOnFileSystem(ref.getId());
        }
        else if (NFS_EXPORT_TYPE.equalsIgnoreCase(ref.getResourceType())) {
            return getOnNfsExport(ref.getId());
        }
        throw new ViPRException("Unknown resource type: " + ref.getResourceType());
    }
View Full Code Here

    public static SAXParser createSAXParser() {
        try {
            return getSAXFactory().newSAXParser();
        }
        catch (Exception e) {
            throw new ViPRException(e);
        }
    }
View Full Code Here

    public static DocumentBuilder createDocumentBuilder() {
        try {
            return getDOMFactory().newDocumentBuilder();
        }
        catch (Exception e) {
            throw new ViPRException(e);
        }
    }
View Full Code Here

    public static Transformer createTransformer() {
        try {
            return getTransformerFactory().newTransformer();
        }
        catch (Exception e) {
            throw new ViPRException(e);
        }
    }
View Full Code Here

    public static Unmarshaller createUnmarshaller(Class<?> itemClass) {
        try {
            return JAXBContext.newInstance(itemClass).createUnmarshaller();
        }
        catch (Exception e) {
            throw new ViPRException(e);
        }
    }
View Full Code Here

        }
        else if (COMMODITY_TYPE.equalsIgnoreCase(ref.getResourceType())) {
            // TODO: CommodityDataStoreRestRep needs to extend from DataStoreRestRep
             return getOnCommodity(ref.getId());
        }
        throw new ViPRException("Unknown resource type: " + ref.getResourceType());
    }
View Full Code Here

     *
     * @param port Target port.
     */
    public void setPort(int port) {
        if (port <=0 || port > 65535) {
            throw new ViPRException("Port specified is not a valid port");
        }
        this.port = port;
    }
View Full Code Here

TOP

Related Classes of com.emc.vipr.client.exceptions.ViPRException

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.