Search in sources :

Example 1 with JmxRepository

use of org.apache.karaf.features.management.codec.JmxRepository in project karaf by apache.

the class FeaturesServiceMBeanImpl method getRepositories.

/**
     * {@inheritDoc}
     */
public TabularData getRepositories() throws Exception {
    try {
        List<Repository> allRepositories = Arrays.asList(featuresService.listRepositories());
        ArrayList<JmxRepository> repositories = new ArrayList<>();
        for (Repository repository : allRepositories) {
            try {
                repositories.add(new JmxRepository(repository));
            } catch (Throwable t) {
                t.printStackTrace();
            }
        }
        return JmxRepository.tableFrom(repositories);
    } catch (Throwable t) {
        t.printStackTrace();
        return null;
    }
}
Also used : JmxRepository(org.apache.karaf.features.management.codec.JmxRepository) Repository(org.apache.karaf.features.Repository) JmxRepository(org.apache.karaf.features.management.codec.JmxRepository)

Aggregations

Repository (org.apache.karaf.features.Repository)1 JmxRepository (org.apache.karaf.features.management.codec.JmxRepository)1