Package java.util

Examples of java.util.Hashtable$Holder


      }
    }

    NamingContextInfo[] contexts = not.getContexts();

    Hashtable  record_compositeName= new Hashtable();
    Hashtable  composite_context= new Hashtable();
    if (contexts != null) {
      Vector newNames = new Vector();
      for (int i = 0; i < contexts.length; i++) {
        if(!looseCoupling) {
          NamingContext nc = getServerImpl().getNamingContext(
                                                              contexts[i].getNamingContext().getId());
          if (nc == null) {
            getServerImpl().addNamingContext(contexts[i]);
            newNames.addElement(contexts[i].getCompositeName());
          }
          // Else the naming context has already been
          // added by an other server that is the (new)
          // owner of this context.

        } else {
          NamingContext nc;
          try{
            nc = getServerImpl().getNamingContext(contexts[i].getCompositeName());
          }catch(MissingRecordException mre){
            nc=null;
          }catch( MissingContextException mce){
            nc=null;
          }
          if(nc == null){
            nc = getServerImpl().newNamingContext( getId(),null,contexts[i].getCompositeName());
            contexts[i].getNamingContext().setOwnerId(getId());
          }

          Enumeration enumRecord = contexts[i].getNamingContext().getEnumRecord();
          while (enumRecord.hasMoreElements()) {         
            Record record =(RecordenumRecord.nextElement();
            Record r = nc.getRecord(record.getName());
            if (r == null
              nc.addRecord(record);
            if(record instanceof ContextRecord){
              CompositeName parentPath = contexts[i].getCompositeName();
              record_compositeName.put(record,parentPath);
            }
          }
          composite_context.put(contexts[i].getCompositeName(),nc);
        }
      }
      if(looseCoupling){
        Enumeration enumKeyRecord = record_compositeName.keys();
        while(enumKeyRecord.hasMoreElements()) {
          Record recor =(Record)enumKeyRecord.nextElement();
          CompositeName cn =(CompositeName)((CompositeName)(record_compositeName.get(recor))).clone();
          cn.add(recor.getName());
          if(composite_context.containsKey(cn)){
            NamingContext nc  =(NamingContext)composite_context.get(cn);
            ((ContextRecord)recor).setId(nc.getId());
          }       
        }
        Enumeration enumContext = composite_context.elements();
        while(enumContext.hasMoreElements()) {
          NamingContext nc  =(NamingContext)enumContext.nextElement();
          getServerImpl().storeNamingContext(nc);
        }
      }
View Full Code Here


    }

    // Load the context index
    nameToIdIndex = (Hashtable)transaction.load(CTX_INDEX);
    if (nameToIdIndex == null) {
      nameToIdIndex = new Hashtable();
    }
  }
View Full Code Here

    else
      return longfmt.format(date);
  }

  public static Hashtable parseQueryString(String query, String encoding) {
    Hashtable result = new Hashtable();
    if (encoding == null)
      encoding = "UTF-8";
    StringTokenizer st = new StringTokenizer(query, "&");
    while (st.hasMoreTokens()) {
      String pair = st.nextToken();
      int ep = pair.indexOf('=');
      String key = ep > 0 ? pair.substring(0, ep) : pair;
      String value = ep > 0 ? pair.substring(ep + 1) : "";
      try {
        key = /* URLDecoder. */decode(key, encoding);
        if (value != null)
          value = /* URLDecoder. */decode(value, encoding);
      } catch (UnsupportedEncodingException uee) {
      }
      String[] values = (String[]) result.get(key);
      String[] newValues;
      if (values == null) {
        newValues = new String[1];
        newValues[0] = value;
      } else {
        newValues = new String[values.length + 1];
        System.arraycopy(values, 0, newValues, 0, values.length);
        newValues[values.length] = value;
      }
      result.put(key, newValues);
    }
    return result;
  }
View Full Code Here

   *          a queue.
   */
  public void add(String target, Vector ids, boolean queueMode) {
    if (queueMode) {
      if (qDenyings == null)
        qDenyings = new Hashtable();
      qDenyings.put(target, ids);
    } else {
      if (subDenyings == null)
        subDenyings = new Hashtable();
      subDenyings.put(target, ids);
    }
  }
View Full Code Here


  /** Returns the queues enumeration. */
  public Enumeration getQueues() {
    if (qDenyings == null)
      return (new Hashtable()).keys();
    return qDenyings.keys();
  }
View Full Code Here

        catch (Exception e)
        {
            throw new CertificateParsingException(e.getMessage());
        }

        holder = new Holder(new IssuerSerial(generateGeneralNames(name),
            new ASN1Integer(cert.getSerialNumber())));
    }
View Full Code Here

            new ASN1Integer(cert.getSerialNumber())));
    }

    public AttributeCertificateHolder(X509Principal principal)
    {
        holder = new Holder(generateGeneralNames(principal));
    }
View Full Code Here

     * @param objectDigest The hash value.
     */
    public AttributeCertificateHolder(int digestedObjectType,
        String digestAlgorithm, String otherObjectTypeID, byte[] objectDigest)
    {
        holder = new Holder(new ObjectDigestInfo(digestedObjectType,
            new ASN1ObjectIdentifier(otherObjectTypeID), new AlgorithmIdentifier(digestAlgorithm), Arrays
                .clone(objectDigest)));
    }
View Full Code Here

        catch (Exception e)
        {
            throw new CertificateParsingException(e.getMessage());
        }

        holder = new Holder(new IssuerSerial(generateGeneralNames(name),
            new DERInteger(cert.getSerialNumber())));
    }
View Full Code Here

            new DERInteger(cert.getSerialNumber())));
    }

    public AttributeCertificateHolder(X509Principal principal)
    {
        holder = new Holder(generateGeneralNames(principal));
    }
View Full Code Here

TOP

Related Classes of java.util.Hashtable$Holder

Copyright © 2018 www.massapicom. 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.