VES Heartbeat and Software Management Feature
[oam/tr069-adapter.git] / acs / common / src / main / java / org / commscope / tr069adapter / acs / common / utils / AcsConstants.java
1 /*\r
2  * ============LICENSE_START========================================================================\r
3  * ONAP : tr-069-adapter\r
4  * =================================================================================================\r
5  * Copyright (C) 2020 CommScope Inc Intellectual Property.\r
6  * =================================================================================================\r
7  * This tr-069-adapter software file is distributed by CommScope Inc under the Apache License,\r
8  * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You\r
9  * may obtain a copy of the License at\r
10  *\r
11  * http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\r
14  * either express or implied. See the License for the specific language governing permissions and\r
15  * limitations under the License.\r
16  * ===============LICENSE_END=======================================================================\r
17  */\r
18 \r
19 package org.commscope.tr069adapter.acs.common.utils;\r
20 \r
21 public class AcsConstants {\r
22 \r
23   private AcsConstants() {}\r
24 \r
25   // CPE Management constants\r
26   public static final String INFORM = "Inform";\r
27   public static final String TRANSFER_COMPLETE = "TransferComplete";\r
28   public static final String ACS_SESSIONID = "JSESSIONID";\r
29   public static final String CWMP_VERSION = "CWMP_VERSION";\r
30 \r
31   // JMS Queues and connection factory names\r
32   public static final String TR069_NBI_REQUEST_Q = "TR069NBIRequestQueue";\r
33   public static final String TR069_NBI_REQUEST_CF = "tr069NBIRequestCF";\r
34 \r
35   public static final String CR_REQ_Q = "TR069DeviceResponseQueue";\r
36   public static final String CR_REQ_CF = "tr069DeviceResponseCF";\r
37 \r
38   public static final String NBI_NOTIFICATION_Q = "NBINotificationQueue";\r
39   public static final String NBI_NOTIFICATION_CF = "nbiNotificationCF";\r
40 \r
41   public static final String NBI_OP_RESULT_Q = "NBIOpResultQueue";\r
42   public static final String NBI_OP_RESULT_CF = "nbiOpResultCF";\r
43 \r
44   // Mapper Service Constants\r
45   public static final String MAPPER_SERVICE_QUALILFIER = "mapper-service";\r
46 \r
47   // TIMER ID Constants\r
48   public static final String CONNECTION_REQUEST = "CONNECTION_REQUEST"; // Constant used in\r
49                                                                         // building the TIMER ID\r
50   public static final String SEPERATOR = "_"; // Constant used in building the TIMER ID\r
51 \r
52   // Connection Request (HTTP Get) constants\r
53   public static final long CONNECTION_RETRY_SLEEP_TIME = 10 * 1000L; // On Connection Request (HTTP\r
54                                                                      // GET) failure, thread will\r
55                                                                      // sleep for x seconds before\r
56                                                                      // retrying.\r
57   public static final Long CR_TIMEOUT = 10 * 1000L; // On Connection Request (HTTP GET) is\r
58                                                     // accepted by device, time to wait for '6\r
59                                                     // Connection Request' Inform to be sent by\r
60                                                     // device. If device does not send any inform\r
61                                                     // within the configured time, connection\r
62                                                     // request shall be retried\r
63   public static final String CR_TIMEOUT_CALLBACK = "ConnectionRequestTimeoutHandler"; // On\r
64                                                                                       // CR_TIMEOUT\r
65                                                                                       // case, the\r
66                                                                                       // callback\r
67                                                                                       // class to\r
68                                                                                       // be called\r
69   public static final int HTTP_OP_FAILED = 1;\r
70   public static final int MAX_CONNECT_RETRY_COUNT = 3; // Max retry count in case device is not\r
71                                                        // accpeting the Connection Request (HTTP\r
72                                                        // GET)\r
73   public static final int DEFAULT_CONNECTION_TIMEOUT = 1 * 10 * 1000; // HTTP GET TIMEOUT, the\r
74                                                                       // thread will be held for x\r
75                                                                       // secs while connecting to\r
76                                                                       // device\r
77   public static final int HTTP_STATUS_OK = 200;\r
78   public static final int HTTP_STATUS_OK_WITH_NO_CONTENT = 204;\r
79   public static final int HTTP_OP_SUCCESS = 0;\r
80   public static final Long HTTP_CONNECTION_IDLE_TIMEOUT = 5 * 1000L;\r
81 \r
82   // Request Processor Retry and Delay constants\r
83   public static final Integer MAX_RETRY_LIMIT = 5; // Max retry count by request processor while\r
84                                                    // processing Informs and Device RPC Responses\r
85   public static final Long DELAY = 10000L; // A delay befoee retrying\r
86 \r
87   // RPC Timer Execution Constants\r
88   public static final Long DEVICE_RPC_EXECUTION_TIMEOUT_SECONDS = 30L; // Timeout for the RPC,\r
89                                                                        // Timer starts after\r
90                                                                        // persisting the RPC. On\r
91                                                                        // timeout, timedout RPC\r
92                                                                        // response shall be sent\r
93                                                                        // to device\r
94   public static final Long DEVICE_RESPONSE_TIMEOUT = 30 * 1000L; // Session timeout, each session\r
95                                                                  // on moving to processing state\r
96                                                                  // will timeout after the\r
97                                                                  // configured value, will restart\r
98                                                                  // the timer if RPOC isn't\r
99                                                                  // timedout yet\r
100   public static final String SESSION_TIMEOUT_CALLBACK_JNDI = "SessionTimeoutHandler";\r
101   public static final String WAITING_FOR_DEVICE_RESPONSE = "WAITING_FOR_DEVICE_RESPONSE";\r
102   public static final String WAITING_FOR_NBI_RESPONSE = "WAITING_FOR_NBI_RESPONSE";\r
103 \r
104   // Timeout operation status codes\r
105   public static final int OPERATION_EXPIRATION_TIMEOUT = 3;\r
106 \r
107   // Custom function constants\r
108   public static final String SESSION_ID = "SESSION_ID";\r
109   public static final String NUMBER_REGEX = "[.][0-9]+[.]";\r
110   public static final String SUCCESS = "SUCCESS";\r
111 }\r