X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2FProviderContextImpl.java;h=b8bb279297cf835cb185d909d6eaf280dccc59d7;hp=5e8c0e82538b4d2beacddd3366571ac2a734f7c5;hb=05861a85bc830af3fce638c301949da23c803ee4;hpb=da4cff5c3a5bc732fb046b563b886a7aaab67c30 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.java index 5e8c0e8253..b8bb279297 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.java @@ -18,21 +18,20 @@ import org.opendaylight.controller.sal.core.api.RpcImplementation; import org.opendaylight.controller.sal.core.api.RpcRegistrationListener; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.common.QName; -import org.osgi.framework.BundleContext; class ProviderContextImpl extends ConsumerContextImpl implements ProviderSession { private final Set registrations = new HashSet<>(); private final Provider provider; - public ProviderContextImpl(final Provider provider, final BundleContext ctx) { - super(null, ctx); + public ProviderContextImpl(final Provider provider, final BrokerImpl broker) { + super(null, broker); this.provider = provider; } @Override public RpcRegistrationWrapper addRpcImplementation(final QName rpcType, final RpcImplementation implementation) throws IllegalArgumentException { - final RpcRegistration origReg = getBroker().getRouter() + final RpcRegistration origReg = getBrokerChecked().getRouter() .addRpcImplementation(rpcType, implementation); final RpcRegistrationWrapper newReg = new RpcRegistrationWrapper( origReg); @@ -56,24 +55,24 @@ class ProviderContextImpl extends ConsumerContextImpl implements ProviderSession final QName rpcType, final RpcImplementation implementation) { throw new UnsupportedOperationException( "TODO: auto-generated method stub"); + } @Override public RoutedRpcRegistration addRoutedRpcImplementation( final QName rpcType, final RpcImplementation implementation) { - throw new UnsupportedOperationException( - "TODO: auto-generated method stub"); + return getBrokerChecked().getRouter().addRoutedRpcImplementation(rpcType, implementation); } @Override public Set getSupportedRpcs() { - return getBroker().getRouter().getSupportedRpcs(); + return getBrokerChecked().getRouter().getSupportedRpcs(); } @Override public ListenerRegistration addRpcRegistrationListener( final RpcRegistrationListener listener) { - return getBroker().getRouter().addRpcRegistrationListener(listener); + return getBrokerChecked().getRouter().addRpcRegistrationListener(listener); } /**