Package ch.iterate.openstack.swift.exception

Examples of ch.iterate.openstack.swift.exception.GenericException


        }
        else if(response.getStatusCode() == HttpStatus.SC_ACCEPTED) {
            throw new ContainerExistsException(response);
        }
        else {
            throw new GenericException(response);
        }
    }
View Full Code Here


        Response response = this.execute(method, new DefaultResponseHandler());
        if(response.getStatusCode() == HttpStatus.SC_CREATED || response.getStatusCode() == HttpStatus.SC_ACCEPTED) {
            return response.getResponseHeader(Constants.X_CDN_URI).getValue();
        }
        else {
            throw new GenericException(response);
        }
    }
View Full Code Here

        Response response = this.execute(method, new DefaultResponseHandler());
        if(response.getStatusCode() == HttpStatus.SC_ACCEPTED) {
            return response.getResponseHeader(Constants.X_CDN_URI).getValue();
        }
        else {
            throw new GenericException(response);
        }
    }
View Full Code Here

        Response response = this.execute(method, new DefaultResponseHandler());
        if(response.getStatusCode() == HttpStatus.SC_CREATED) {
            return response.getResponseHeader(HttpHeaders.ETAG).getValue();
        }
        else {
            throw new GenericException(response);
        }
    }
View Full Code Here

            Response response = this.execute(method, new DefaultResponseHandler());
            if(response.getStatusCode() == HttpStatus.SC_CREATED) {
                manifestEtag = response.getResponseHeader(HttpHeaders.ETAG).getValue();
            }
            else {
                throw new GenericException(response);
            }
        }
        catch(URISyntaxException ex) {
            throw new GenericException("URI Building failed when creating Static Large Object manifest", ex);
        }
        return manifestEtag;
    }
View Full Code Here

                            containerSegments.add(object);
                        }
                    }
                    else {
                        method.abort();
                        throw new GenericException(response);
                    }
                }
            }
            else {
                /*
                 * Not a large object, so return null
                 */
                return null;
            }
        }
        catch(NotFoundException e) {
            /*
             * Just means no object exists with the specified region, container and name
             */
            return null;
        }
        catch(JsonParseException e) {
            throw new GenericException("JSON parsing failed reading static large object manifest", e);
        }
        catch(URISyntaxException e) {
            throw new GenericException("URI Building failed reading static large object manifest", e);
        }

        return existingSegments;
    }
View Full Code Here

        Response response = this.execute(method, new DefaultResponseHandler());
        if(response.getStatusCode() == HttpStatus.SC_CREATED) {
            return response.getResponseHeader(HttpHeaders.ETAG).getValue();
        }
        else {
            throw new GenericException(response);
        }
    }
View Full Code Here

        Response response = this.execute(method, new DefaultResponseHandler());
        if(response.getStatusCode() == HttpStatus.SC_CREATED) {
            return response.getResponseHeader(HttpHeaders.ETAG).getValue();
        }
        else {
            throw new GenericException(response);
        }
    }
View Full Code Here

        Response response = this.execute(method, new DefaultResponseHandler());
        if(response.getStatusCode() == HttpStatus.SC_CREATED) {
            return response.getResponseHeader(HttpHeaders.ETAG).getValue();
        }
        else {
            throw new GenericException(response);
        }
    }
View Full Code Here

            method.abort();
            throw new NotFoundException(response);
        }
        else {
            method.abort();
            throw new GenericException(response);
        }
    }
View Full Code Here

TOP

Related Classes of ch.iterate.openstack.swift.exception.GenericException

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.