Package java.util

Examples of java.util.Hashtable$EmptyIterator


    else if (verbose)
      System.out.println("update rar \"" + rarName +
                         "\" with \"" + raProperties + "\"");

    // create Map of properties
    Map map = new Hashtable();
    Hashtable prop = null;
    String nodeName = null;
    line = lnr.readLine();
    while (line != null) {
      if (line.startsWith("[")) {
        prop = new Hashtable();
        nodeName = line.substring(line.indexOf("[")+1,line.indexOf("]"));
        map.put(nodeName.trim(),prop);
      } else {
        StringTokenizer st = new StringTokenizer(line);
        if (st.countTokens() == 2 && prop != null) {
          prop.put(st.nextToken(),st.nextToken());
        }
      }
      line = lnr.readLine();
    }
    file.close();

    if (debug)
      System.out.println("RAConfig.updateRAR : map = " + map);

    // create ra.xml file with new values
    File rarFile = new File(rarName);
    if (rarFile.exists()) {
      ZipFile zipFile = new ZipFile(rarFile.getAbsolutePath());
      for (Enumeration zippedFiles = zipFile.entries(); zippedFiles.hasMoreElements(); ) {
        // Retrieve entry of existing files
        ZipEntry currEntry = (ZipEntry) zippedFiles.nextElement();
        if (debug)
          System.out.println("RAConfig.updateRAR : currEntry = " + currEntry);
        if (currEntry.getName().equalsIgnoreCase(RA_XML)) {
          InputStream reader = zipFile.getInputStream(currEntry);
          createFile("ra.xml",update(reader,map));
          reader.close();
          break;
        }
      }
      zipFile.close();
    }

    // update rar
    updateZIP(rarName,RA_XML, tmpDir + "ra.xml",RA_XML);

    if (updateA3servers) {
      // update a3servers.xml (host and port).
      prop = (Hashtable) map.get("org.objectweb.joram.client.connector.JoramAdapter");
      if (prop != null) {
        if (debug)
          System.out.println("RAConfig.updateRAR : prop = " + prop);
        String host = (String) prop.get("HostName");
        short serverId = -1;
        String sid = (String) prop.get("ServerId");
        if (sid != null)
          serverId = new Short(sid).shortValue();
        else {
          if (debug)
            System.out.println("RAConfig.updateRAR : ServerId not found in ra.properties");
        }
        String port = (String) prop.get("ServerPort");
        if (host != null && host.length() > 0
            && port != null && port.length() > 0
            && serverId >= 0) {
          updateA3Servers(rarName,host,port,serverId);
        }
View Full Code Here


  /**
   * Codes a <code>ConnectionFactory</code> as a Hashtable for traveling
   * through the SOAP protocol.
   */
  public Hashtable code() {
    return code(new Hashtable(), "cf");
  }
View Full Code Here

    return '(' + super.toString() +
      ",addresses=" + addresses + ')';
  }

  public Hashtable getEnvironment() {
    Hashtable env = new Hashtable();
    return env;
  }
View Full Code Here

  /**
   *
   * @exception IOException
   */
  public Hashtable soapCode() throws IOException {
    Hashtable h = new Hashtable();
    h.put("classname", getClass().getName());

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    writeTo(baos);
    baos.flush();
    h.put("bytecontent", baos.toByteArray());
    baos.close();

    return h;
  }
View Full Code Here

  /**
   *
   * @exception  IOException
   */
  public Hashtable soapCode() throws IOException {
    Hashtable h = new Hashtable();
    h.put("classname", getClass().getName());

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    writeTo(baos);
    baos.flush();
    h.put("bytecontent", baos.toByteArray());
    baos.close();

    return h;
  }
View Full Code Here

    // TODO (AF): Changes the GetUsersReply class to return 2 arrays.
    // TODO (AF): Same work with GetRightsReply !
    GetUsersRequest request = new GetUsersRequest(serverId);
    GetUsersReply reply = (GetUsersReply) doRequest(request);

    Hashtable users = reply.getUsers();
    list = new User[users.size()];
    String name;
    int i = 0;
    for (Enumeration names = users.keys(); names.hasMoreElements();) {
      name = (String) names.nextElement();
      list[i++] = new User(name, (String) users.get(name));
    }
    return list;
  }
View Full Code Here

   *
   * @exception JMSException  Actually never thrown.
   */
  public final Enumeration getPropertyNames() throws JMSException {
    if (momMsg.properties == null)
      return (new Hashtable()).keys();

    return momMsg.properties.keys();
  }
View Full Code Here

    consumers = new Vector();
    producers = new Vector();
    browsers = new Vector();
    repliesIn = new fr.dyade.aaa.common.Queue();
    sendings = new Hashtable();
    deliveries = new Hashtable();
   
    closer = new Closer();

    // If the session is transacted and the transactions limited by a timer,
    // a closing task might be useful.
View Full Code Here

    ClusterQueue cluster = (ClusterQueue) jndiCtx.lookup("clusterQueue");

    AdminHelper.setQueueCluster(cluster,queue);

    Hashtable h = cluster.getCluster();
    h.put(sid,queue);

    ClusterQueue clusterQueue = new ClusterQueue(h);
    System.out.println("clusterQueue = " + clusterQueue);

    clusterQueue.setReader(user);
View Full Code Here

    super.agentInitialize(firstTime);

    writeRequestContextLists = (Hashtable) AgentServer.getTransaction().load(WRITE_REQUEST_TABLE);
    if (writeRequestContextLists == null) {
      writeRequestContextLists = new Hashtable();
    }

    initRequestContextLists = (Hashtable) AgentServer.getTransaction().load(INIT_REQUEST_TABLE);
    if (initRequestContextLists == null) {
      initRequestContextLists = new Hashtable();
    }

    syncRequestContextLists = (Hashtable) AgentServer.getTransaction().load(SYNC_REQUEST_TABLE);
    if (syncRequestContextLists == null) {
      syncRequestContextLists = new Hashtable();
    }

    servers = (Vector)AgentServer.getTransaction().load(SERVER_LIST);
    if (servers == null) {
      servers = new Vector();     
View Full Code Here

TOP

Related Classes of java.util.Hashtable$EmptyIterator

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.