[
https://issues.apache.org/jira/browse/FELIX-4672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre De Rop resolved FELIX-4672.
----------------------------------
Resolution: Fixed
Commited a patch in the sandbox in [1].
Also, added a testcase for this issue in [2]
Now, you can define an external callback instance for an adapter service, like
the following:
{code}
AdapterCallback callback = new AdapterCallback();
Component adapter = m.createAdapterService(OriginalService.class, null,
"m_originalService", callbackInstance, "set", "changed","unset", "swap")
.setInterface(AdaptedService.class.getName(), null)
.setImplementation(AdaptedServiceImpl.class);
{code}
[1]
http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/
[2]
http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/AdapterWithCallbackInstanceTest.java
> Allow callbacks to third party instance for adapters
> ----------------------------------------------------
>
> Key: FELIX-4672
> URL: https://issues.apache.org/jira/browse/FELIX-4672
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Affects Versions: dependencymanager-3.2.0
> Reporter: Philipp Buluschek
> Assignee: Pierre De Rop
> Priority: Minor
> Fix For: dependencymanager-4.0.0
>
>
> When creating an adapter, it should be possible to redirect the
> added/changed/removed callbacks to a third party instance (as is possible
> with normal ServiceDependencies).
> Currently it is only possible to get the callbacks on the adapter itself,
> using
> DM.createAdapterService(Device.class.name, null, "add", "change", "remove")
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)