Package java.util

Examples of java.util.Hashtable


   *
   * @param location  the location key
   * @param dest   the Destination
   */
  public void addDestination(String location, Destination dest) {
    if (cluster == null) cluster = new Hashtable();

    if (location == null) {
      String destname = dest.getName();
      location = "server" + destname.substring(0, destname.indexOf('.'));
    }
View Full Code Here


    }
  }

  /** Restores the administered object from a naming reference. */
  public void fromReference(Reference ref) throws NamingException {
    cluster = new Hashtable();
    int i = 0;
    Destination dest = null;
    StringBuffer strbuf = new StringBuffer(20);

    while (true) {
View Full Code Here

  /**
   * Codes a <code>ClusterDestination</code> as a Hashtable for
   * travelling through the SOAP protocol.
   */
  public Hashtable code() {
    Hashtable h = new Hashtable();

    Map.Entry entries[] = new Map.Entry [cluster.size()];
    cluster.entrySet().toArray(entries);
    StringBuffer strbuf = new StringBuffer(20);

    for (int i=0; i<entries.length; i++) {
      strbuf.setLength(0);
      strbuf.append("cluster#").append(i).append(".key");
      h.put(strbuf.toString(), (String) entries[i].getKey());

      Destination dest = (Destination) entries[i].getValue();

      strbuf.setLength(0);
      strbuf.append("cluster#").append(i).append(".destName");
      h.put(strbuf.toString(), dest.getName());
    }

    return h;
  }
View Full Code Here

    return h;
  }

  public void decode(Hashtable h) {
    cluster = new Hashtable();

    int i = 0;
    Destination dest = null;
    StringBuffer strbuf = new StringBuffer(20);
View Full Code Here

     * If redeployMode is false, a faster but less capable mode will be used.
     */
    public TldLocationsCache(ServletContext ctxt, boolean redeployMode) {
        this.ctxt = ctxt;
        this.redeployMode = redeployMode;
        mappings = new Hashtable();
        initialized = false;
    }
View Full Code Here

  public GetRightsReply(boolean success, String info,
                        boolean isFreeReading, boolean isFreeWriting) {
    super(success, info);
    this.isFreeReading = isFreeReading;
    this.isFreeWriting = isFreeWriting;
    readers = new Hashtable();
    writers = new Hashtable();
  }
View Full Code Here

    isFreeWriting = StreamUtil.readBooleanFrom(is);
    int size = StreamUtil.readIntFrom(is);
    if (size <= 0) {
      readers = null;
    } else {
      readers = new Hashtable(size*4/3);
      for (int i=0; i< size; i++) {
        String key = StreamUtil.readStringFrom(is);
        String value = StreamUtil.readStringFrom(is);
        readers.put(key, value);
      }
    }
    size = StreamUtil.readIntFrom(is);
    if (size <= 0) {
      writers = null;
    } else {
      writers = new Hashtable(size*4/3);
      for (int i=0; i< size; i++) {
        String key = StreamUtil.readStringFrom(is);
        String value = StreamUtil.readStringFrom(is);
        writers.put(key, value);
      }
View Full Code Here

    if (counter == null) {
      requestCounter = 0;
    } else {
      requestCounter = counter.intValue();
    }
    requests = new Hashtable();
    manager.agentInitialize(firstTime);
  }
View Full Code Here

    }

    private void initSSLAttrs() {
      if (socket.getClass().getName().indexOf("SSLSocket") > 0) {
        try {
          sslAttributes = new Hashtable();
          Object sslSession = socket.getClass()
              .getMethod("getSession", Utils.EMPTY_CLASSES)
              .invoke(socket, Utils.EMPTY_OBJECTS);
          if (sslSession != null) {
            sslAttributes.put("javax.net.ssl.session", sslSession);
View Full Code Here

      reqQuery = null;
      pw = null;
      rout = null;
      formParameters = null;
      if (attributes == null)
        attributes = new Hashtable();
      else
        attributes.clear();
      if (sslAttributes != null)
        attributes.putAll(sslAttributes);
      resCode = -1;
View Full Code Here

TOP

Related Classes of java.util.Hashtable

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.