Bulk-add copyright headers to java files
[controller.git] / opendaylight / connectionmanager / implementation / src / main / java / org / opendaylight / controller / connectionmanager / internal / ConnectionMgmtEventType.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.connectionmanager.internal;
9
10 public enum ConnectionMgmtEventType {
11     NODE_DISCONNECTED_FROM_MASTER("Node is disconnected from master"),
12     CLUSTER_VIEW_CHANGED("Cluster Composition changed");
13
14     private ConnectionMgmtEventType(String name) {
15         this.name = name;
16     }
17
18     private String name;
19
20     public String toString() {
21         return name;
22     }
23
24     public static ConnectionMgmtEventType fromString(String pName) {
25         for(ConnectionMgmtEventType p:ConnectionMgmtEventType.values()) {
26             if (p.toString().equals(pName)) {
27                 return p;
28             }
29         }
30         return null;
31     }
32 }