2 * Copyright 2017 BOCO Corporation. CMCC Technologies Co., Ltd
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onap.nfvo.emsdriver.collector.alarm;
20 reqLoginAlarm("reqLoginAlarm",1,"all"),
21 ackLoginAlarm("ackLoginAlarm",2,"all"),
22 reqSyncAlarmMsg("reqSyncAlarmMsg",3,"msg"),
23 ackSyncAlarmMsg("ackSyncAlarmMsg",4,"msg"),
24 reqSyncAlarmFile("reqSyncAlarmFile",5,"file"),
25 ackSyncAlarmFile("ackSyncAlarmFile",6,"file"),
26 ackSyncAlarmFileResult("ackSyncAlarmFileResult",7,"file"),
27 reqHeartBeat("reqHeartBeat",8,"all"),
28 ackHeartBeat("ackHeartBeat",9,"all"),
29 closeConnAlarm("closeConnAlarm",10,"all"),
30 realTimeAlarm("realTimeAlarm",0,"all"),
31 undefined("undefined",-1,"all");
33 public int value = -1;
34 public String name = null;
35 public String type = null;
37 MsgType(String name,int value,String type){this.name = name;this.value = value;this.type = type;}
39 public static MsgType getMsgTypeValue(int msgTypeValue){
41 for(MsgType msgType : MsgType.values()){
42 if(msgType.value == msgTypeValue){
49 public static MsgType getMsgTypeName(String msgTypeName){
51 for(MsgType msgType : MsgType.values()){
52 if(msgType.name.toLowerCase().equals(msgTypeName.toLowerCase())){
59 public String toString(){