[
https://issues.apache.org/jira/browse/FELIX-5403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15652223#comment-15652223
]
Pierre De Rop commented on FELIX-5403:
--------------------------------------
I actually re-added the old dm3 starting/started/stopping/stopped methods in
the ComponentStateListener interface.
(revision 1769022). The behavior is the same as in dm3 (see FELIX-4002). I
think the patch is compatible with current dm4 state listeners, since I used
java8 empty default methods (no need to bump the dm major version, I think):
{code}
public interface ComponentStateListener {
public void changed(Component c, ComponentState state);
/**
* Called when the component is starting. At this point, the required
* dependencies have been injected, but the service has not been registered
* yet.
*
* @param component the component
*/
public default void starting(Component component) {}
/**
* Called when the component is started. At this point, the component has
been
* registered.
*
* @param component the component
*/
public default void started(Component component) {}
/**
* Called when the component is stopping. At this point, the component is
still
* registered.
*
* @param component the component
*/
public default void stopping(Component component) {}
/**
* Called when the component is stopped. At this point, the component has
been
* unregistered.
*
* @param component the component
*/
public default void stopped(Component component) {}
}
{code}
Also re-added old integration test from dm3 in
org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/api/ComponentStateListenerTest.java
please, close this issue if you are ok, or maybe someone else disagrees with
this patch (in this case, I will decommit the patch and will then update the
javadoc).
thank you.
> Improve the Javadoc for org.apache.felix.dm.ComponentStateListener
> ------------------------------------------------------------------
>
> Key: FELIX-5403
> URL: https://issues.apache.org/jira/browse/FELIX-5403
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Affects Versions: org.apache.felix.dependencymanager-r8
> Reporter: Dobias van Buuren
> Assignee: Pierre De Rop
>
> The class level javadoc in org.apache.felix.dm.ComponentStateListener still
> mentiones the methods from the DM 3 version of the ComponentStateListener
> interface (starting, started, stopping and stopped).
> Those methods aren't available anymore in the DM 4 version.
> It would be nice if this gets corrected in a newer version, because it is not
> trivial what the alternatives in org.apache.felix.dm.ComponentState are.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)