Examples of check()


Examples of org.apache.etch.compiler.opt.Authorize.check()

    for (Thrown n: thrown)
      n.check();

    Authorize auth = getAuth();
    if (auth != null)
      auth.check( parent(), this );
  }

  @Override
  public Service service()
  {
View Full Code Here

Examples of org.apache.felix.ipojo.runtime.core.services.CheckService.check()

    @Test
    public void testSeveralConstructor() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), ci.getInstanceName());
        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
        assertTrue("Check assignation", cs.check());
        String name = (String) cs.getProps().get("name");
        assertEquals("Check message", "hello world", name);
        //assertNull("Check message", name);
    }
View Full Code Here

Examples of org.apache.felix.ipojo.runtime.core.test.services.CheckService.check()

        assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);

        ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
        assertNotNull("Check CheckService availability", cs_ref);
        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
        assertTrue("check CheckService invocation", cs.check());

        fooProvider.stop();

        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
        assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
View Full Code Here

Examples of org.apache.felix.ipojo.runtime.externalhandlers.services.CheckService.check()

        Dictionary<String, Object> p = cs.getProps();
        Integer changes = (Integer) p.get("changes");
        assertNotNull("Check changes no null", changes);
        assertEquals("Changes changes 1 (" + changes + ")", changes.intValue(), 1);
        assertEquals("Check instance validity - 1", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
        cs.check();
        p = cs.getProps();
        changes = (Integer) p.get("changes");
        assertEquals("Changes changes 2 (" + changes + ")", changes.intValue(), 2);
        assertEquals("Check instance validity - 2", arch.getInstanceDescription().getState(), ComponentInstance.INVALID);
        cs.check();
View Full Code Here

Examples of org.apache.felix.ipojo.runtime.test.dependencies.timeout.services.CheckService.check()

        ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
        assertNotNull("Check cs availability", ref_cs);

        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
        assertTrue("Check invocation", cs.check());

        // Stop the provider.
        provider.stop();
        assertNull("No FooService", osgiHelper.getServiceReference(FooService.class.getName(), null));
        ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
View Full Code Here

Examples of org.apache.felix.ipojo.test.composite.service.CheckService.check()

    }
   
    ServiceReference ref = sc2.getServiceReference(CheckService.class.getName());
    CheckService check = (CheckService) sc2.getService(ref);
   
    assertTrue("Check invocation", check.check());
   
    sc2.ungetService(ref);
   
    // Check visibility
    assertNotNull("Check foo service visible inside the composite", sc2.getServiceReference(FooService.class.getName()));
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.configuration.service.CheckService.check()

        // Check the service property
        // Not exposed here:
        assertNull("Classes -0", ref.getProperty("classes"));
       
        CheckService check = (CheckService) getContext().getService(ref);
        assertTrue(check.check());
       
        // Property exposed now.
        ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), ci.getInstanceName());
        Class[] str = (Class[]) ref.getProperty("classes");
        assertEquals("Classes size", 1, str.length);
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.eh.service.CheckService.check()

    Properties p = cs.getProps();
    Integer changes = (Integer) p.get("changes");
    assertNotNull("Check changes no null", changes);
    assertEquals("Changes changes 1 ("+changes+")", changes.intValue(), 1);
    assertEquals("Check instance validity - 1", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
    cs.check();
    p = cs.getProps();
    changes = (Integer) p.get("changes");
    assertEquals("Changes changes 2 ("+changes+")", changes.intValue(), 2);
    assertEquals("Check instance validity - 2", arch.getInstanceDescription().getState(), ComponentInstance.INVALID);
    cs.check();
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.lfc.service.CheckService.check()

       
        // The conf is correct, the PS must be provided
        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under1");
        assertNotNull("Check service availability -1", ref);
        CheckService cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 1", cs.check());
        getContext().ungetService(ref);
        cs = null;
       
        // Reconfigure the instance with a bad configuration
        props.put("conf", "bar"); // Bar is a bad conf
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.lifecycle.callback.service.CheckService.check()

       
        // The conf is correct, the PS must be provided
        ServiceReference ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), "under");
        assertNotNull("Check service availability -1", ref);
        CheckService cs = (CheckService) getContext().getService(ref);
        assertTrue("Check state 1", cs.check());
        getContext().ungetService(ref);
        cs = null;
       
        // Reconfigure the instance with a bad configuration
        props.put("conf", "bar"); // Bar is a bad conf
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.