Examples of lookup()


Examples of org.unidal.initialization.DefaultModuleContext.lookup()

  @Override
  protected void initComponents(ServletConfig servletConfig) throws ServletException {
    try {
      ModuleContext ctx = new DefaultModuleContext(getContainer());
      ModuleInitializer initializer = ctx.lookup(ModuleInitializer.class);
      File clientXmlFile = getConfigFile(servletConfig, "cat-client-xml", "client.xml");
      File serverXmlFile = getConfigFile(servletConfig, "cat-server-xml", "server.xml");

      ctx.setAttribute("cat-client-config-file", clientXmlFile);
      ctx.setAttribute("cat-server-config-file", serverXmlFile);

Examples of org.unidal.initialization.ModuleContext.lookup()

  @Override
  protected void initComponents(ServletConfig servletConfig) throws ServletException {
    try {
      ModuleContext ctx = new DefaultModuleContext(getContainer());
      ModuleInitializer initializer = ctx.lookup(ModuleInitializer.class);
      File clientXmlFile = getConfigFile(servletConfig, "cat-client-xml", "client.xml");
      File serverXmlFile = getConfigFile(servletConfig, "cat-server-xml", "server.xml");

      ctx.setAttribute("cat-client-config-file", clientXmlFile);
      ctx.setAttribute("cat-server-config-file", serverXmlFile);

Examples of org.w3c.jigsaw.auth.IPMatcher.lookup()

    {
  Client      client      = request.getClient();
  InetAddress inetaddress = client.getInetAddress();
  IPMatcher   ipmatcher   = getIPMatcher();
  System.out.println(">>> "+inetaddress);
  if (ipmatcher.lookup(inetaddress) != null) {
      // secure ip, basic auth
      setValue(ATTR_SECURITY_LEVEL, new Integer(0));
  } else {
      // unsecure ip, digest auth
      setValue(ATTR_SECURITY_LEVEL, new Integer(1));

Examples of org.w3c.tools.resources.ContainerResource.lookup()

      // List the children:
    for (int i = 0 ; i < resources.size() ; i++) {
        String            name = (String) resources.elementAt(i);
        ResourceReference rr   = null;
        long              size = -1;
        rr = cresource.lookup(name);
        FramedResource resource = null;
        if (rr != null) {
      try {
          resource = (FramedResource) rr.unsafeLock();
          // remove manually deleted FileResources

Examples of org.w3c.tools.resources.DirectoryResource.lookup()

        for (int i = 0 ; i < indexes.length ; i++) {
      String index = indexes[i];
      if ( index != null && index.length() > 0) {
          DirectoryResource dir =
        (DirectoryResource) resource;
          ResourceReference rr = dir.lookup(index);
          if (rr != null) {
        try {
            FramedResource rindex =
          (FramedResource) rr.lock();
            return rindex.lookup(ls,lr);

Examples of org.w3c.tools.resources.FramedResource.lookup()

          ResourceReference rr = dir.lookup(index);
          if (rr != null) {
        try {
            FramedResource rindex =
          (FramedResource) rr.lock();
            return rindex.lookup(ls,lr);
        } catch (InvalidResourceException ex) {
        } finally {
            rr.unlock();
        }
          }

Examples of org.w3c.tools.resources.indexer.TemplateContainer.lookup()

        key = ext_entry;
        if (match == MimeType.MATCH_SPECIFIC_SUBTYPE)
      break; // exact match exit loop asap
    }
      }
      return types.lookup(key);
  } catch (InvalidResourceException ex) {
      String msg = ("[resource indexer]: content-types \""+
        type+
        "\" couldn't be restored ("+ex.getMessage()+")");
      getContext().getServer().errlog(msg);

Examples of org.waveprotocol.box.server.waveserver.DeltaStore.lookup()

  public void testLookupReturnsWavelets() throws Exception {
    Pair<DeltaStore,WaveletDeltaRecord> pair = newDeltaStoreWithRecord(WAVE1_WAVELET1);
    DeltaStore store = pair.first;

    assertEquals(ImmutableSet.of(WAVE1_WAVELET1.waveletId), store.lookup(WAVE1_WAVELET1.waveId));
  }

  public void testLookupDoesNotReturnEmptyWavelets() throws Exception {
    DeltaStore store = newDeltaStore();
    DeltasAccess wavelet = store.open(WAVE1_WAVELET1);

Examples of org.xtreemfs.babudb.api.database.Database.lookup()

           
            // and execute group insert
            db.insert(group, null).get();
           
            // now do a lookup
            byte[] result = db.lookup(0, "Key1".getBytes(), null).get();
           
            // create a checkpoint for faster start-ups
            databaseSystem.getCheckpointer().checkpoint();
           
            // shutdown database

Examples of org.xtreemfs.babudb.api.database.DatabaseRO.lookup()

        ir.addInsert(1, "bla".getBytes(), "blub".getBytes());
        db.insert(ir, null).get();
       
        // check if the snapshot still contains the old values
        for (int i = 1; i < 4; i++)
            assertEquals("Value" + i, new String(snap1.lookup(0, ("Key" + i).getBytes(), null).get()));
       
        Iterator<Entry<byte[], byte[]>> it = snap1.prefixLookup(0, "Key".getBytes(), null).get();
        for (int i = 1; i < 4; i++) {
            Entry<byte[], byte[]> next = it.next();
            assertEquals("Key" + i, new String(next.getKey()));
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.