Examples of lookup()


Examples of org.apache.twill.api.TwillRunnerService.lookup()

    // Creates a new runner service to check it can regain control over running app.
    TwillRunnerService runnerService = YarnTestUtils.createTwillRunnerService();
    runnerService.startAndWait();

    try {
      Iterable <TwillController> controllers = runnerService.lookup("EchoServer");
      Assert.assertTrue(YarnTestUtils.waitForSize(controllers, 1, 60));

      for (TwillController c : controllers) {
        LOG.info("Stopping application: " + c.getRunId());
        c.stop().get(30, TimeUnit.SECONDS);

Examples of org.apache.uima.util.Settings.lookUp()

    String contextName = ((UimaContext_ImplBase) aContext).getQualifiedContextName();
    if ("/ExternalOverrides/".equals(contextName)) {
      String actual = null;
      try {
        Settings settings = ((UimaContext_ImplBase)aContext).getExternalOverrides();
        actual = settings.lookUp("test.externalFloatArray");
      } catch (ResourceConfigurationException e) {
        Assert.fail(e.getMessage());
      }
      String expected = "[]";
      Assert.assertEquals(expected, actual);

Examples of org.apache.uima.util.impl.Settings_impl.lookUp()

      InputStream is;
      try {
        is = new ByteArrayInputStream(lines.getBytes("UTF-8"));
        testSettings.load(is);
        is.close();
        String val = testSettings.lookUp("foo");
        Assert.assertEquals("[ok,OK]", val);
        try {
          val = testSettings.lookUp("bad");
          Assert.fail("\"bad\" should create an error");
        } catch (ResourceConfigurationException e) {

Examples of org.apache.wicket.session.ISessionStore.lookup()

      return;
    }

    ISessionStore store = getSessionStore();
    Request request = RequestCycle.get().getRequest();
    if (store.lookup(request) == null)
    {
      // explicitly create a session
      id = store.getSessionId(request, true);
      // bind it
      store.bind(request, this);

Examples of org.apache.ws.policy.util.PolicyRegistry.lookup()

                OMAttribute attribute = factory.createOMAttribute("URI", null, policyURIString);
                refElement.addAttribute(attribute);
                element.addChild(refElement);
               
                PolicyRegistry reg = policyInclude.getPolicyRegistry();
                Policy p = reg.lookup(policyURIString);
               
                if(p == null) {
                    throw new Exception("Policy not found for uri : " + policyURIString);
                }
               

Examples of org.apache.yoko.tools.common.idltypes.IdlScopeBase.lookup()

                if (name[i + 1].equals("Object")) {
                    break;
                }
            }
           
            IdlDefn idlDef = scope.lookup(name[i]);

            if (idlDef == null) {
                // Before creating module, check to see if a Corba type
                // represent this name aleady exists.
                // For example if type is a.b.c and we are about to create

Examples of org.atmosphere.cpr.BroadcasterFactory.lookup()

                            (AtmosphereResource<HttpServletRequest, HttpServletResponse>)
                                    req.getAttribute(AtmosphereServlet.ATMOSPHERE_RESOURCE);
                    BroadcasterFactory bp = (BroadcasterFactory)
                            req.getAttribute(AtmosphereServlet.BROADCASTER_FACTORY);

                    broadcaster = bp.lookup(r.getBroadcaster().getClass(), topic, true);
                } catch (Throwable ex) {
                    throw new WebApplicationException(ex);
                }
                req.setAttribute(AtmosphereFilter.INJECTED_BROADCASTER, broadcaster);
                return broadcaster;

Examples of org.codehaus.dna.ResourceLocator.lookup()

        }

        final ResourceLocator parent = getParent();
        if( null != parent )
        {
            return parent.lookup( key );
        }
        else
        {
            final String message = "Unable to locate resource " + key + ".";
            throw new MissingResourceException( message, key );

Examples of org.codehaus.dna.impl.DefaultResourceLocator.lookup()

                      false,
                      locator.contains( "rez" ) );

        try
        {
            locator.lookup( "rez" );
        }
        catch( MissingResourceException e )
        {
            return;
        }

Examples of org.codehaus.jparsec.DefaultSourceLocator.lookup()

    assertEquals(0, DefaultSourceLocator.binarySearch(intList(), 1));
  }
 
  public void testLookup_noLineBreaksScanned() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    assertEquals(new Location(2, 4), locator.lookup(1));
  }
 
  public void testLookup_inFirstLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
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.