ServiceHandler update for new PCE compatibility
[transportpce.git] / servicehandler / src / main / java / org / opendaylight / transportpce / servicehandler / ServiceEndpointType.java
similarity index 62%
rename from servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/MyEndpoint.java
rename to servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/ServiceEndpointType.java
index e7bd93f3f1e780c769499108fadbb38b5cea9424..1b2b77abd23093701963b3b30fa4daf1274745cb 100644 (file)
@@ -5,36 +5,34 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.transportpce.servicehandler;
 
+import com.google.common.collect.ImmutableMap;
+
 import java.util.Map;
 
 /**
  * Enum class to identify ServiceAEnd / serviceZEnd.
  *
- * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
- *
  */
-enum MyEndpoint {
+public enum ServiceEndpointType {
     SERVICEAEND(1),
     SERVICEZEND(2);
 
     int value;
-    private static final Map<Integer, MyEndpoint> VALUE_MAP;
+    private static final Map<Integer, ServiceEndpointType> VALUE_MAP;
 
-    MyEndpoint(int value) {
+    ServiceEndpointType(int value) {
         this.value = value;
     }
 
     static {
-        final com.google.common.collect.ImmutableMap.Builder<java.lang.Integer, MyEndpoint> b =
-                com.google.common.collect.ImmutableMap.builder();
-        for (MyEndpoint enumItem : MyEndpoint.values()) {
-            b.put(enumItem.value, enumItem);
+        final ImmutableMap.Builder<java.lang.Integer, ServiceEndpointType> builder =
+                ImmutableMap.builder();
+        for (ServiceEndpointType enumItem : ServiceEndpointType.values()) {
+            builder.put(enumItem.value, enumItem);
         }
-
-        VALUE_MAP = b.build();
+        VALUE_MAP = builder.build();
     }
 
     /**
@@ -53,7 +51,8 @@ enum MyEndpoint {
      *            Integer to identify Enum
      * @return corresponding ServiceFormat item
      */
-    public static MyEndpoint forValue(int valueArg) {
+    public static ServiceEndpointType forValue(int valueArg) {
         return VALUE_MAP.get(valueArg);
     }
+
 }