Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Added listener for rpc registrations.
[controller.git]
/
opendaylight
/
md-sal
/
sal-dom-broker
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
dom
/
broker
/
ProviderContextImpl.xtend
diff --git
a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.xtend
b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.xtend
index 27e559cb9b5011161a25050287555d8ee0c6165c..3fdd7065770dac618a2fa5cc15ebeb1c37cb110a 100644
(file)
--- a/
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.xtend
+++ b/
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/ProviderContextImpl.xtend
@@
-9,6
+9,10
@@
import org.opendaylight.yangtools.yang.common.QName
import org.osgi.framework.BundleContext
import org.opendaylight.yangtools.concepts.AbstractObjectRegistration
import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration
import org.osgi.framework.BundleContext
import org.opendaylight.yangtools.concepts.AbstractObjectRegistration
import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration
+import static java.util.Collections.*
+import java.util.Collections
+import java.util.HashMap
+import org.opendaylight.controller.sal.core.api.RpcRegistrationListener
class ProviderContextImpl extends ConsumerContextImpl implements ProviderSession {
class ProviderContextImpl extends ConsumerContextImpl implements ProviderSession {
@@
-41,7
+45,7
@@
class ProviderContextImpl extends ConsumerContextImpl implements ProviderSession
throw new IllegalStateException(
"Implementation was not registered in this session");
}
throw new IllegalStateException(
"Implementation was not registered in this session");
}
- broker.removeRpcImplementation(implToRemove.type);
+ broker.removeRpcImplementation(implToRemove.type
,localImpl
);
rpcImpls.remove(implToRemove.type);
}
rpcImpls.remove(implToRemove.type);
}
@@
-53,7
+57,7
@@
class ProviderContextImpl extends ConsumerContextImpl implements ProviderSession
private def removeAllRpcImlementations() {
if (!rpcImpls.empty) {
for (entry : rpcImpls.entrySet) {
private def removeAllRpcImlementations() {
if (!rpcImpls.empty) {
for (entry : rpcImpls.entrySet) {
- broker.removeRpcImplementation(entry.key);
+ broker.removeRpcImplementation(entry.key
,entry.value
);
}
rpcImpls.clear
}
}
rpcImpls.clear
}
@@
-67,6
+71,13
@@
class ProviderContextImpl extends ConsumerContextImpl implements ProviderSession
throw new UnsupportedOperationException("TODO: auto-generated method stub")
}
throw new UnsupportedOperationException("TODO: auto-generated method stub")
}
+ override getSupportedRpcs() {
+ broker.getSupportedRpcs();
+ }
+
+ override addRpcRegistrationListener(RpcRegistrationListener listener) {
+ broker.addRpcRegistrationListener(listener);
+ }
}
class RpcRegistrationImpl extends AbstractObjectRegistration<RpcImplementation> implements RpcRegistration {
}
class RpcRegistrationImpl extends AbstractObjectRegistration<RpcImplementation> implements RpcRegistration {
@@
-87,4
+98,4
@@
class RpcRegistrationImpl extends AbstractObjectRegistration<RpcImplementation>
context = null
}
context = null
}
-}
\ No newline at end of file
+}