*/
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.DeviceDisconnectedHandler;
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 <mbobak@cisco.com> on 25.2.2015.
*/
-public interface RpcContext extends RequestContextStack, AutoCloseable, DeviceDisconnectedHandler {
-
+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);
- /**
- * Method for setting request quota value. When the Request Context quota is exceeded, incoming RPCs fail
- * immediately, with a well-defined error.
- *
- * @param maxRequestsPerDevice
- */
- void setRequestContextQuota(int maxRequestsPerDevice);
-
+ void setStatisticsRpcEnabled(boolean isStatisticsRpcEnabled);
}