All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.bancaditalia.oss.sdmx.exceptions.SdmxResponseException Maven / Gradle / Ivy

There is a newer version: 3.0.6
Show newest version
/*
 * Copyright 2016 Bank Of Italy
 * 
 * Licensed under the EUPL, Version 1.1 or - as soon they will be approved 
 * by the European Commission - subsequent versions of the EUPL (the "Licence");
 * You may not use this work except in compliance with the Licence.
 * You may obtain a copy of the Licence at:
 * 
 * http://ec.europa.eu/idabc/eupl
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the Licence for the specific language governing permissions and 
 * limitations under the Licence.
 */
package it.bancaditalia.oss.sdmx.exceptions;

import java.io.IOException;

/**
 * Specific exception that deals with response codes from SDMX RESTful web
 * services.
 *
 * @see REST cheat sheet
 * @see SDMX Web Services Guidelines
 * @author Philippe Charles
 */
public final class SdmxResponseException extends SdmxException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private final int responseCode;

	SdmxResponseException(int sdmxCode, IOException cause, String message) 
	{
		super(message, cause);
		this.responseCode = sdmxCode;
	}

	public int getResponseCode() {
		return responseCode;
	}
	
	public static final int SDMX_NO_RESULTS_FOUND = 100;
	public static final int SDMX_UNAUTHORIZED = 110;
	public static final int SDMX_RESPONSE_SIZE_CLIENT = 130;
	public static final int SDMX_SYNTAX_ERROR = 140;
	public static final int SDMX_SEMANTIC_ERROR = 150;
	public static final int SDMX_INTERNAL_SERVER_ERROR = 500;
	public static final int SDMX_NOT_IMPLEMENTED = 501;
	public static final int SDMX_SERVICE_UNAVAILABLE = 503;
	public static final int SDMX_RESPONSE_SIZE_SERVER = 510;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy