X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fadsal%2Fnorthbound%2Fcommons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnorthbound%2Fcommons%2Fexception%2FNotImplemented.java;fp=opendaylight%2Fadsal%2Fnorthbound%2Fcommons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnorthbound%2Fcommons%2Fexception%2FNotImplemented.java;h=16d0cd6e29bbf63cb03d67484ea37ca995390af7;hb=42c32160bfd41de57189bb246fec5ffb48ed8e9e;hp=0000000000000000000000000000000000000000;hpb=edf5bfcee83c750853253ccfd991ba7000f5f65b;p=controller.git diff --git a/opendaylight/adsal/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/exception/NotImplemented.java b/opendaylight/adsal/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/exception/NotImplemented.java new file mode 100644 index 0000000000..16d0cd6e29 --- /dev/null +++ b/opendaylight/adsal/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/exception/NotImplemented.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.northbound.commons.exception; + +import javax.ws.rs.core.Response; + +/** + * Implementation of StatusType for error 501 as in: + * http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6 + */ +public class NotImplemented implements Response.StatusType { + @Override + public int getStatusCode() { + return 501; + } + + @Override + public String getReasonPhrase() { + return "Not Implemented"; + } + + @Override + public Response.Status.Family getFamily() { + return Response.Status.Family.SERVER_ERROR; + } +} \ No newline at end of file