blob: b6e0e8e6649fbee9631b01008aa9a15a3611c36d [file] [log] [blame]
Niraj Dubeya8287192021-03-23 19:54:17 +05301/*
2 * Copyright 2021-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.bgpmonitoring;
18
19/**
20 * Enum to Provide the Different types of BMP peer down reasons.
21 */
22public enum PeerDownReason {
23
24 LOCAL_SYSTEM_CLOSED_SESSION_WITH_NOTIFICATION((byte) 0x01),
25
26 LOCAL_SYSTEM_CLOSED_SESSION_WITHOUT_NOTIFICATION((byte) 0x02),
27
28 REMOTE_SYSTEM_CLOSED_SESSION_WITH_NOTIFICATION((byte) 0x03),
29
30 REMOTE_SYSTEM_CLOSED_SESSION_WITHOUT_NOTIFICATION((byte) 0x04);
31
32
33 private final byte value;
34
35 /**
36 * Assign value with the value val as the types of BMP peer down reasons.
37 *
38 * @param val type of BMP peer down reasons
39 */
40 PeerDownReason(byte val) {
41 value = val;
42 }
43
44 /**
45 * Returns value as type of BMP peer down reasons.
46 *
47 * @return value type of BMP peer down reasons
48 */
49 public byte getReason() {
50 return value;
51 }
52}