+
+
+
+
+ protected def resolveInvokerClass(Class<? extends NotificationListener> class1) {
+ return <RuntimeGeneratedInvokerPrototype>withClassLoaderAndLock(class1.classLoader,lock) [|
+ val invoker = invokerClasses.get(class1);
+ if (invoker !== null) {
+ return invoker;
+ }
+ val newInvoker = generateListenerInvoker(class1);
+ invokerClasses.put(class1, newInvoker);
+ return newInvoker
+
+ ]
+ }
+}
+
+@Data
+package class RuntimeGeneratedInvoker implements NotificationInvoker {
+
+ @Property
+ val NotificationListener delegate;
+
+ @Property
+ var org.opendaylight.controller.sal.binding.api.NotificationListener<Notification> invocationProxy;
+
+ @Property
+ var RuntimeGeneratedInvokerPrototype prototype;
+
+ new(NotificationListener delegate, RuntimeGeneratedInvokerPrototype prototype) {
+ _delegate = delegate;
+ _prototype = prototype;
+ _invocationProxy = prototype.protoClass.newInstance as org.opendaylight.controller.sal.binding.api.NotificationListener<Notification>;
+ RuntimeCodeHelper.setDelegate(_invocationProxy, delegate);