import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueue;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
-import org.opendaylight.openflowplugin.api.openflow.device.DeviceState;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceRegistry;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
+import org.opendaylight.openflowplugin.api.openflow.device.TxFacade;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.EventIdentifier;
import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
import org.opendaylight.yangtools.yang.binding.DataContainer;
import org.opendaylight.yangtools.yang.common.RpcError;
abstract class AbstractService<I, O> {
private static final Logger LOG = LoggerFactory.getLogger(AbstractService.class);
- private static final long WAIT_TIME = 2000;
- private static final BigInteger PRIMARY_CONNECTION = BigInteger.ZERO;
private final short version;
private final BigInteger datapathId;
private final RequestContextStack requestContextStack;
private final DeviceContext deviceContext;
private final MessageSpy messageSpy;
- private final NodeId nodeId;
private EventIdentifier eventIdentifier;
- public AbstractService(final RequestContextStack requestContextStack, final DeviceContext deviceContext) {
+ AbstractService(final RequestContextStack requestContextStack, final DeviceContext deviceContext) {
final DeviceInfo deviceInfo = deviceContext.getDeviceInfo();
this.requestContextStack = requestContextStack;
this.datapathId = deviceInfo.getDatapathId();
this.version = deviceInfo.getVersion();
this.messageSpy = deviceContext.getMessageSpy();
- this.nodeId = deviceInfo.getNodeId();
}
public EventIdentifier getEventIdentifier() {
return datapathId;
}
- public NodeId getNodeId() {
- return nodeId;
- }
-
public RequestContextStack getRequestContextStack() {
return requestContextStack;
}
+ @Deprecated
public DeviceContext getDeviceContext() {
return deviceContext;
}
+ protected DeviceRegistry getDeviceRegistry() {return deviceContext;}
+
+ public DeviceInfo getDeviceInfo() {return deviceContext.getDeviceInfo();}
+
+ public TxFacade getTxFacade() {return deviceContext;}
+
public MessageSpy getMessageSpy() {
return messageSpy;
}