[MDSAL-774] Do not use proxies for Action/Rpc adapter Created: 06/Oct/22  Updated: 17/Jan/24

Status: Confirmed
Project: mdsal
Component/s: Binding runtime
Affects Version/s: None
Fix Version/s: 14.0.0

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: pt
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Relates
relates to MDSAL-852 IAE during dynamic proxy instantiation Resolved
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MDSAL-793 Split out mdsal.binding.dom.codec.imp... Sub-task Resolved Robert Varga  

 Description   

We are currently using a java.lang.reflect.Proxy to implement Action instances and route them towards a backend. While this works, it also adds quite a bit of ceremony to the invocation, as we could very easily follow CodecDataObject layout to create these proxies.

The key thing to understand here is that yang.binding.Action covers the invocation surface and therefore we can quite sensibly route it through codecs. The only thing we need to generate dynamically is a subclass which ties the (hypothetical) AdapterAction abstract base class and the concrete Binding Action interface – everything else is just default methods and generics (which fizzle at runtime).

This also extends to Rpc adapters.

In order to do this, we will need to factor out the ByteBuddy loading machinery from mdsal-binding-dom-codec, so that it can be reused by mdsal-binding-dom-adapter. That artifact should be named mdsal-binding-loader.


Generated at Wed Feb 07 20:10:56 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.