X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fsal%2Frestconf%2Fimpl%2FBrokerFacade.java;h=6b4787064c1dc2e2e572c8aa818c49ab28d8032c;hb=8e02a3899e5069ce40ad3c070a911402c78fe24e;hp=9ca8137aee27e780434e0a2e2692679a8141fe25;hpb=fc7cf19a6e5f0d0f27365921f97c03e397ee9db7;p=netconf.git diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/BrokerFacade.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/BrokerFacade.java index 9ca8137aee..6b4787064c 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/BrokerFacade.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/BrokerFacade.java @@ -40,7 +40,6 @@ import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService; import org.opendaylight.controller.md.sal.dom.api.DOMRpcException; import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult; import org.opendaylight.controller.md.sal.dom.api.DOMRpcService; -import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession; import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag; import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType; import org.opendaylight.netconf.sal.streams.listeners.ListenerAdapter; @@ -84,7 +83,6 @@ public class BrokerFacade { private static final BrokerFacade INSTANCE = new BrokerFacade(); private volatile DOMRpcService rpcService; - private volatile ConsumerSession context; private DOMDataBroker domDataBroker; private DOMNotificationService domNotification; @@ -99,16 +97,12 @@ public class BrokerFacade { this.domNotification = domNotification; } - public void setContext(final ConsumerSession context) { - this.context = context; - } - public static BrokerFacade getInstance() { return BrokerFacade.INSTANCE; } private void checkPreconditions() { - if (this.context == null || this.domDataBroker == null) { + if (this.domDataBroker == null) { throw new RestconfDocumentedException(Status.SERVICE_UNAVAILABLE); } }