Use of transformation services in a binding

Tags: #<Tag:0x00007f745377bbf8> #<Tag:0x00007f745377bab8>

I’m trying to use a MAP transformation service in a new binding, but I’m not sure how to wire the transformation service in.

One of the existing 2.x bindings (globalcache) uses:

TransformationHelper.getTransformationService(bundleContext, "MAP");

But since the use of bundleContext is now deprecated, what is the correct way to access a transformation service from my handler? Is there any example code?

Don’t do it in the binding but grab the transformation helper from the factory and pass it into the binding. Here’s an example of how I do it in the sony binding:

1 Like