Examples of HandlerDescription


Examples of org.apache.felix.ipojo.architecture.HandlerDescription

        ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "mycons");
        Assert.assertNotNull(refv1);
        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);

        HandlerDescription desc = arch.getInstanceDescription().getHandlerDescription("org.apache.felix.ipojo:requires");
        Assert.assertNotNull(desc);

        DependencyHandlerDescription d = (DependencyHandlerDescription) desc;
        Assert.assertNotNull(d.getDependencies());
        Assert.assertEquals(1, d.getDependencies().length);
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

        ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "mycons");
        Assert.assertNotNull(refv1);
        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);

        HandlerDescription desc = arch.getInstanceDescription().getHandlerDescription("org.apache.felix.ipojo:requires");
        Assert.assertNotNull(desc);

        DependencyHandlerDescription d = (DependencyHandlerDescription) desc;
        Assert.assertNotNull(d.getDependencies());
        Assert.assertEquals(1, d.getDependencies().length);
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

     * If the handler override this method, it can customize the description.
     * By default, this method returns the simplest description.
     * @return the description of the handler.
     */
    public HandlerDescription getDescription() {
        return new HandlerDescription(this);
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

    @Test
    public void createAHost() throws Exception {
        PrimitiveComponentType type = createAWhiteboardHost();
        ComponentInstance ci = type.createInstance();
        assertThat(ci.getState(), is(ComponentInstance.VALID));
        HandlerDescription hd = ci.getInstanceDescription().getHandlerDescription(Whiteboard.NAMESPACE + ":" + Whiteboard.NAME);
        assertThat(hd, is(notNullValue()));
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

    @Test
    public void createDoubleHost() throws Exception {
        PrimitiveComponentType type = createASecondWhiteboardHost();
        ComponentInstance ci = type.createInstance();
        assertThat(ci.getState(), is(ComponentInstance.VALID));
        HandlerDescription hd = ci.getInstanceDescription().getHandlerDescription(Whiteboard.NAMESPACE + ":" + Whiteboard.NAME);
        assertThat(hd, is(notNullValue()));
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

          ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "IgnoreCase-1");
          Assert.assertNotNull(refv1);
          Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);
          Assert.assertEquals(ComponentInstance.VALID, arch.getInstanceDescription().getState());

          HandlerDescription desc = arch.getInstanceDescription()
              .getHandlerDescription("orG.apAche.feliX.iPOJO.tests.CORE.hAnDlEr:EmPtY")// Check with the declared name.

          Assert.assertNotNull(desc);
          Assert.assertTrue(desc.isValid());
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

          ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "IgnoreCase-2");
          Assert.assertNotNull(refv1);
          Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);
          Assert.assertEquals(ComponentInstance.VALID, arch.getInstanceDescription().getState());

          HandlerDescription desc = arch.getInstanceDescription()
              .getHandlerDescription("org.apache.felix.ipojo.tests.core.handler:empty"); // Check with different case.
          Assert.assertNotNull(desc);
          Assert.assertTrue(desc.isValid());
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

    @Test
    public void createAHost() throws Exception {
        PrimitiveComponentType type = createAWhiteboardHost();
        ComponentInstance ci = type.createInstance();
        assertThat (ci.getState(), is (ComponentInstance.VALID));
        HandlerDescription hd = ci.getInstanceDescription().getHandlerDescription(Whiteboard.NAMESPACE + ":" + Whiteboard.NAME);
        assertThat (hd, is (notNullValue()));
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

    @Test
    public void createDoubleHost() throws Exception {
        PrimitiveComponentType type = createASecondWhiteboardHost();
        ComponentInstance ci = type.createInstance();
        assertThat (ci.getState(), is (ComponentInstance.VALID));
        HandlerDescription hd = ci.getInstanceDescription().getHandlerDescription(Whiteboard.NAMESPACE + ":" + Whiteboard.NAME);
        assertThat (hd, is (notNullValue()));
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.HandlerDescription

          ServiceReference refv1 = ipojo.getServiceReferenceByName(Architecture.class.getName(), "IgnoreCase-1");
          Assert.assertNotNull(refv1);
          Architecture arch = (Architecture) osgi.getServiceObject(refv1);
          Assert.assertEquals(ComponentInstance.VALID, arch.getInstanceDescription().getState());

          HandlerDescription desc = arch.getInstanceDescription()
              .getHandlerDescription("orG.apAche.feliX.iPOJO.tests.CORE.hAnDlEr:EmPtY")// Check with the declared name.

          Assert.assertNotNull(desc);
          Assert.assertTrue(desc.isValid());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.