2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.neutron.northbound.api;
11 import javax.ws.rs.WebApplicationException;
12 import javax.ws.rs.core.MediaType;
13 import javax.ws.rs.core.Response;
16 * Status Code 503 (Service Unavailable Error)
18 * The server is currently unable to handle the request due to a temporary
19 * overloading or maintenance of the server.
20 * The implication is that this is a temporary condition which will be alleviated
25 public class ServiceUnavailableException extends WebApplicationException {
26 private static final long serialVersionUID = 1L;
29 * Constructor for the SERVICE_UNAVAILABLE custom handler
31 * @param string Error message to specify further the
32 * SERVICE_UNAVAILABLE response
35 public ServiceUnavailableException(String string) {
36 super(Response.status(Response.Status.SERVICE_UNAVAILABLE).entity(string).type(MediaType.TEXT_PLAIN).build());