aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerStatus.java
diff options
context:
space:
mode:
authorramverma <ram.krishna.verma@ericsson.com>2018-08-31 17:16:01 +0100
committerramverma <ram.krishna.verma@ericsson.com>2018-09-04 09:58:38 +0100
commitecc059f29f8da065356571ef00c6cad595e298b3 (patch)
treee69272c979178b1d8f17ce7ca0700dc25addd0a0 /plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerStatus.java
parente705197bb18af558fb7ea853b01e1297521763f2 (diff)
Adding code for managing life cycle of SDC Client
* Adding init/start/stop methods in SDCReceptionHandler for managing lifecycle of SDC Client. * Adding a handler status enum to hold all the possible status values. * Adding test cases to cover code changes fully. Change-Id: Ib6f370485ff330538bfada6030c592629ed3fd1c Issue-ID: POLICY-956 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerStatus.java')
-rw-r--r--plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerStatus.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerStatus.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerStatus.java
new file mode 100644
index 00000000..d0e04c78
--- /dev/null
+++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerStatus.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.distribution.reception.handling.sdc;
+
+/**
+ * Class to hold the possible values for status of {@link SdcReceptionHandler}.
+ *
+ * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
+ */
+public enum SdcReceptionHandlerStatus {
+
+ /**
+ * The SdcReceptionHandler is not alive.
+ */
+ STOPPED,
+
+ /**
+ * The SdcReceptionHandler is initialized but not started yet.
+ */
+ INIT,
+
+ /**
+ * The SdcReceptionHandler is initialized, started & ready to handle incoming notifications.
+ */
+ IDLE,
+
+ /**
+ * The SdcReceptionHandler is currently busy in handling notifications.
+ */
+ BUSY
+}