felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre De Rop (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FELIX-4158) ComponentDeclaration should give access to component information
Date Sat, 01 Nov 2014 23:26:33 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14193567#comment-14193567
] 

Pierre De Rop edited comment on FELIX-4158 at 11/1/14 11:25 PM:
----------------------------------------------------------------

Committed a patch in revision 1636069 for this issue, and also the corresponding test case
in [1].

The component implementation class name and the provided services were already returned by
the ComponentDeclaration.getClassName() and ComponentDeclaration.getServices() methods.

For the dependency class name and dependency filter, I just added the following signatures
in the ComponentDependencyDeclaration interface:

- ComponentDependencyDeclaration.getSimpleName(): only returns the dependency name (it does
not include the filters, unlike the getName() method does).

- ComponentDependencyDeclaration.getFilter(): returns the dependency filter.

(see the FELIX4158_DependencyDeclarationTest for examples).

[1] http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/FELIX4158_DependencyDeclarationTest.java


was (Author: pderop):
Committed a patch in revision 1636069 for this issue, and also the corresponding test case
in [1].

The component implementation class name and the provided services was already returned by
ComponentDeclaration.getClassName() and ComponentDeclaration.getServices() methods.

For the dependency class name and dependency filter, I just added the following signatures
in the ComponentDependencyDeclaration interface:

- ComponentDependencyDeclaration.getSimpleName(): only returns the dependency name (it does
not include the filters, unlike the getName() method does).

- ComponentDependencyDeclaration.getFilter(): returns the dependency filter.

(see the FELIX4158_DependencyDeclarationTest for examples).

[1] http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.itest/src/org/apache/felix/dm/itest/FELIX4158_DependencyDeclarationTest.java

> ComponentDeclaration should give access to component information
> ----------------------------------------------------------------
>
>                 Key: FELIX-4158
>                 URL: https://issues.apache.org/jira/browse/FELIX-4158
>             Project: Felix
>          Issue Type: Improvement
>          Components: Dependency Manager
>            Reporter: Arjun Panday
>            Priority: Minor
>             Fix For: dependencymanager-4.0.0
>
>
> DependencyManager has a ComponentDeclaration and ComponentDependencyDeclaration interface
to get information about the components it manages, but these interfaces don't have a explicit
access to the implementation class, the exposed interfaces or the dependency filter.
> For now, one can only parse Component.toString to find the services and implementation
(assuming the implementation doesn't override its toString method), and parse ComponentDependencyDeclaration.getName
to find the requested service and filter. This kind of parsing is naturally very unsafe and
dependent on the implementation details.
> I suggest to add the following methods:
> ComponentDeclaration.getImplementation should return the implementation class name
> ComponentDeclaration.getServices should return a list of interfaces declared by the component
> ComponentDependencyDeclaration.getService should return the requested service name (interface)
> ComponentDependencyDeclaration.getFilter should return the associated filter
> Although minor, these changes would be very useful. (My immediate need is for the improvement
of the service diagnostics webconsole plugin)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message