+ Proxy(final RoutingTable table) {
+ rpcs = table.getRoutes();
+ rpcInvoker = table.getRpcInvoker();
+ }
+
+ @Override
+ public void writeExternal(final ObjectOutput out) throws IOException {
+ out.writeObject(Serialization.serializedActorPath(rpcInvoker));
+
+ final NormalizedNodeDataOutput nnout = NormalizedNodeInputOutput.newDataOutput(out);
+ nnout.writeInt(rpcs.size());
+ for (DOMRpcIdentifier id : rpcs) {
+ nnout.writeSchemaPath(id.getType());
+ nnout.writeYangInstanceIdentifier(id.getContextReference());
+ }
+ }
+
+ @Override
+ public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
+ rpcInvoker = JavaSerializer.currentSystem().value().provider().resolveActorRef((String) in.readObject());