Merge "Eliminate the use of CompositeObjectRegistration"
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / md / ModelDrivenSwitch.java
index 9ba867b6484e295b308a893725190c2e253c1efa..90270c6326ffa39317e73571a727e1fb255c3fba 100644 (file)
@@ -7,7 +7,9 @@
  */
 package org.opendaylight.openflowplugin.api.openflow.md;
 
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
+import com.google.common.base.Optional;
+import java.math.BigInteger;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
@@ -24,34 +26,26 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.SalP
 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
-import org.opendaylight.yangtools.concepts.CompositeObjectRegistration;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 /**
  * interface concatenating all md-sal services provided by OF-switch
  */
-public interface ModelDrivenSwitch extends //
-        SalGroupService, //
-        SalFlowService, //
-        SalMeterService, //
-        SalTableService,//
-        SalPortService,
-        PacketProcessingService,
-        NodeConfigService,//
-        OpendaylightGroupStatisticsService, //
-        OpendaylightMeterStatisticsService, //
-        OpendaylightFlowStatisticsService, //
-        OpendaylightPortStatisticsService, //
-        OpendaylightFlowTableStatisticsService, //
-        OpendaylightQueueStatisticsService, //
+public interface ModelDrivenSwitch
+        extends
+        SalGroupService,
+        SalFlowService,
+        SalMeterService, SalTableService, SalPortService, PacketProcessingService, NodeConfigService,
+        OpendaylightGroupStatisticsService, OpendaylightMeterStatisticsService, OpendaylightFlowStatisticsService,
+        OpendaylightPortStatisticsService, OpendaylightFlowTableStatisticsService, OpendaylightQueueStatisticsService,
         Identifiable<InstanceIdentifier<Node>> {
 
     /**
-     * @param ctx
+     * @param rpcProviderRegistry
      * @return wrapped list of {service provider + path} registration couples
      */
-    CompositeObjectRegistration<ModelDrivenSwitch> register(ProviderContext ctx);
+    ModelDrivenSwitchRegistration register(RpcProviderRegistry rpcProviderRegistry);
 
     /**
      * @return id of encapsulated node (served by this impl)
@@ -64,4 +58,29 @@ public interface ModelDrivenSwitch extends //
      * @return session context object
      */
     SessionContext getSessionContext();
+
+    /**
+     * Returns whether this *instance* is entity owner or not
+     * @return true if it's entity owner, else false.
+     */
+    boolean isEntityOwner();
+
+    /**
+     * Set entity ownership satus of this switch in *this* instance
+     * @param isOwner
+     */
+    void setEntityOwnership(boolean isOwner);
+
+    /**
+     * Send table feature to the switch to get tables features for all the tables.
+     * @return Transaction id
+     */
+    Optional<BigInteger> sendEmptyTableFeatureRequest();
+
+    /**
+     * Method send port/desc multipart request to the switch to fetch the initial details.
+     */
+
+    public abstract void requestSwitchDetails();
+
 }