Bug 5540 - ConvertorManager base
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / common / Convertor.java
index 4583a15587c2ee7d45dcfd5e0a636ea8b7068ef8..0e94005c07d0234bb0ac2ccc49975f664d750563 100644 (file)
@@ -1,5 +1,5 @@
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -8,20 +8,27 @@
 
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common;
 
-import java.math.BigInteger;
-
-
 /**
- * converting from MD-SAL model into appropriate OF-API model
- * @param <FROM>  type of source
- * @param <TO>  type of result
+ * Converts OpenflowJava to MDSal model and vice versa
+ *
+ * @param <FROM> type of source
+ * @param <TO>   type of result
  */
 public interface Convertor<FROM, TO> {
-    
+
+    /**
+     * Gets type of convertor, used in
+     * {@link org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager}.
+     *
+     * @return the type of convertor
+     */
+    Class<?> getType();
+
     /**
-     * @param source source type
-     * @param datapathid  datapath id
-     * @return converted match (into OF-API model)
+     * Converts source to result
+     *
+     * @param source source
+     * @return converted source
      */
-    TO convert(FROM source,BigInteger datapathid);
+    TO convert(FROM source);
 }