Package com.github.dockerjava.api

Examples of com.github.dockerjava.api.DockerClientException


           
            String transformedKey = DockerHelper.transformToHeaderName(key);
           
            // Validate URI parameter name
            if (!validParamMap.containsKey(transformedKey)) {
                throw new DockerClientException(key + " is not a valid URI parameter");
            }
           
           
            try {
                Class<?> parameterClass = validParamMap.get(transformedKey);
                Object parameterValue = parameters.get(key);
               
                if (parameterClass == null || parameterValue == null) {
                    throw new DockerClientException("Failed to validate parameter type for property " + key);
                }
               
                if (Integer.class == parameterClass) {
                    Integer.parseInt((String)parameterValue);
                } else if (Boolean.class == parameterClass) {
                    BooleanUtils.toBooleanObject((String)parameterValue, "true", "false", "null");
                }
            } catch (Exception e) {
                throw new DockerClientException("Failed to validate parameter type for property " + key);                   
            }
        }
             
    }
View Full Code Here

TOP

Related Classes of com.github.dockerjava.api.DockerClientException

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.