Improve cleanup after device disconnected event
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / rpc / RpcContext.java
index ec8c7e7bcf65713755fef35d998f48cda21c688a..1dddefbef1b5b075989006bd62cae1c24c414079 100644 (file)
@@ -7,8 +7,8 @@
  */
 package org.opendaylight.openflowplugin.api.openflow.rpc;
 
+import org.opendaylight.openflowplugin.api.openflow.OFPContext;
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
-import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceContextClosedHandler;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
 /**
@@ -16,8 +16,12 @@ import org.opendaylight.yangtools.yang.binding.RpcService;
  * tracks the state of any user requests and how they map onto protocol requests. It uses
  * {@link org.opendaylight.openflowplugin.api.openflow.device.RequestContext} to perform requests.
  * <p>
- * Created by Martin Bobak &lt;mbobak@cisco.com&gt; on 25.2.2015.
  */
-public interface RpcContext extends RequestContextStack, AutoCloseable, DeviceContextClosedHandler {
+public interface RpcContext extends RequestContextStack, OFPContext {
     <S extends RpcService> void registerRpcServiceImplementation(Class<S> serviceClass, S serviceInstance);
+
+    <S extends RpcService> S lookupRpcService(Class<S> serviceClass);
+    <S extends RpcService> void unregisterRpcServiceImplementation(Class<S> serviceClass);
+
+    void setStatisticsRpcEnabled(boolean isStatisticsRpcEnabled);
 }