1 /*******************************************************************************
2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ============LICENSE_END=========================================================
19 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21 *******************************************************************************/
22 package com.att.dmf.mr.exception;
25 * Define the Error Response Codes for MR
26 * using this enumeration
27 * @author rajashree.khare
30 public enum DMaaPResponseCode {
36 RESOURCE_NOT_FOUND(3001),
37 SERVER_UNAVAILABLE(3002),
38 METHOD_NOT_ALLOWED(3003),
39 GENERIC_INTERNAL_ERROR(1004),
43 INVALID_CREDENTIALS(4001),
44 ACCESS_NOT_PERMITTED(4002),
45 UNABLE_TO_AUTHORIZE(4003),
47 * PUBLISH AND SUBSCRIBE
49 MSG_SIZE_EXCEEDS_BATCH_LIMIT(5001),
50 UNABLE_TO_PUBLISH(5002),
51 INCORRECT_BATCHING_FORMAT(5003),
52 MSG_SIZE_EXCEEDS_MSG_LIMIT(5004),
55 PARTIAL_PUBLISH_MSGS(5007),
56 CONSUME_MSG_ERROR(5008),
57 PUBLISH_MSG_ERROR(5009),
58 RETRIEVE_TRANSACTIONS(5010),
59 RETRIEVE_TRANSACTIONS_DETAILS(5011),
60 TOO_MANY_REQUESTS(5012),
62 RATE_LIMIT_EXCEED(301),
67 GET_TOPICS_FAIL(6001),
68 GET_TOPICS_DETAILS_FAIL(6002),
69 CREATE_TOPIC_FAIL(6003),
70 DELETE_TOPIC_FAIL(6004),
71 GET_PUBLISHERS_BY_TOPIC(6005),
72 GET_CONSUMERS_BY_TOPIC(6006),
73 PERMIT_PUBLISHER_FOR_TOPIC(6007),
74 REVOKE_PUBLISHER_FOR_TOPIC(6008),
75 PERMIT_CONSUMER_FOR_TOPIC(6009),
76 REVOKE_CONSUMER_FOR_TOPIC(6010),
77 GET_CONSUMER_CACHE(6011),
78 DROP_CONSUMER_CACHE(6012),
79 GET_METRICS_ERROR(6013),
82 REMOVE_BLACKLIST(6016),
83 TOPIC_NOT_IN_AAF(6017);
84 private int responseCode;
86 public int getResponseCode() {
89 private DMaaPResponseCode (final int code) {