Teach BindingToNormalizedNodeCodec action paths
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / main / java / org / opendaylight / mdsal / binding / dom / adapter / BindingDOMRpcImplementationAdapter.java
index ffd175d0429f3282030c3ca6d65303c45ce811fe..9e561869d7223f6a317f05161ca3e571684f5a06 100644 (file)
@@ -11,7 +11,6 @@ import com.google.common.base.Preconditions;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.util.concurrent.CheckedFuture;
-import com.google.common.util.concurrent.JdkFutureAdapters;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.lang.reflect.Method;
 import java.util.HashMap;
@@ -84,15 +83,15 @@ public class BindingDOMRpcImplementationAdapter implements DOMRpcImplementation
     }
 
     private DataObject deserialize(final SchemaPath rpcPath, final NormalizedNode<?, ?> input) {
-        if (input instanceof LazySerializedContainerNode) {
-            return ((LazySerializedContainerNode) input).bindingData();
+        if (input instanceof BindingDataAware) {
+            return ((BindingDataAware) input).bindingData();
         }
         final SchemaPath inputSchemaPath = rpcPath.createChild(inputQname);
         return codec.fromNormalizedNodeRpcData(inputSchemaPath, (ContainerNode) input);
     }
 
     private ListenableFuture<RpcResult<?>> invoke(final SchemaPath schemaPath, final DataObject input) {
-        return JdkFutureAdapters.listenInPoolThread(invoker.invokeRpc(delegate, schemaPath.getLastComponent(), input));
+        return invoker.invokeRpc(delegate, schemaPath.getLastComponent(), input);
     }
 
     private CheckedFuture<DOMRpcResult, DOMRpcException> transformResult(