Wait for RPCService registered in RpcServiceMetadata 71/39971/2
authorTom Pantelis <tpanteli@brocade.com>
Tue, 7 Jun 2016 18:04:50 +0000 (14:04 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 10 Jun 2016 03:07:42 +0000 (03:07 +0000)
commitef7700c56ee56a5c79444c95199f5b016de22de9
tree3e6cab4b8f9e25daf6bef0c2a41698e78579601f
parentddeacdd4072121c423f478316c5cc00192f9312b
Wait for RPCService registered in RpcServiceMetadata

When obtaining an RpcService via the RpcProviderRegistry, the returned
instance is actually a proxy and the underlying DOM service instance may
not be registered yet. So if the caller tries to invoke an RPC it will
fail due to no implementation available. This is seen with the
ToasterTest with the switch to blueprint.

To alleviate I modified the RpcServiceMetadata to wait (asycnhronously)
for the underlying DOM RPC service implementation by registering a
DOMRpcAvailabilityListener with the DOMRpcService. In the callback, once
one of the RPCs is seen then it notifies the blueprint container that
its dependencies are satisfied so it can proceed.

Change-Id: I9f35afdd69ad069654a895239654a2ddc1ce1ee0
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/AbstractDependentComponentFactoryMetadata.java [new file with mode: 0644]
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/DataStoreAppConfigMetadata.java
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/OpendaylightNamespaceHandler.java
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/RpcServiceMetadata.java