Package java.util

Examples of java.util.Hashtable


                                                        null, (Class[])null,
                                                        GroupRequest.GET_ALL, 5000);

                        System.out.println("rsp_list is " + rsp_list);

                        Hashtable all_stocks=null;
                        for(int i=0; i < rsp_list.size(); i++) {
                            Rsp rsp=(Rsp)rsp_list.elementAt(i);
                            Object obj=rsp.getValue();
                            if(obj == null || obj instanceof Throwable)
                                continue;
                            all_stocks=(Hashtable)obj;
                            break;
                        }

                        if(all_stocks == null) {
                            showMsg("No stocks found");
                            return;
                        }
                        clearMsg();
                        listbox.removeAll();
                        String key;
                        Float val;
                        for(Enumeration en=all_stocks.keys(); en.hasMoreElements();) {
                            key=(String)en.nextElement();
                            val=(Float)all_stocks.get(key);
                            if(val == null)
                                continue;
                            listbox.add(key + ": " + val.toString());
                        }
                    }
View Full Code Here


  public Hashtable properties = null;
  /** Hashtable of all clusters */
  public Hashtable clusters = null;

  public A3CMLConfig() {
    domains = new Hashtable();
    servers = new Hashtable();
    properties = new Hashtable();
    clusters = new Hashtable();
  }
View Full Code Here

  public A3CMLConfig getDomainConfig(String[] listDomainName) throws Exception {
    if (Log.logger.isLoggable(BasicLevel.DEBUG))
      Log.logger.log(BasicLevel.DEBUG,
                     "Config.getDomainConfig(" + listDomainName + ")");

    Hashtable context = new Hashtable();

    A3CMLConfig domainConf = new A3CMLConfig();
    Vector domainList = new Vector();
    for (int i = 0; i < listDomainName.length; i++)
      domainList.addElement(listDomainName[i]);
View Full Code Here

  public A3CMLCluster(short sid,
                      String name) throws Exception {
    this.sid = sid;
    this.name = name;
    this.properties = new Hashtable();
    this.servers = new Hashtable();
  }
View Full Code Here

    }
  }

  public A3CMLProperty addProperty(A3CMLProperty prop) {
    if (properties == null)
      properties = new Hashtable();
    return (A3CMLProperty) properties.put(prop.name, prop);
  }
View Full Code Here

    return false;
  }

  public A3CMLNat addNat(A3CMLNat natElement) {
    if (nat == null)
      nat = new Hashtable();
    return (A3CMLNat) nat.put(new Short(natElement.sid), natElement);
  }
View Full Code Here

      for (Enumeration e = properties.keys(); e.hasMoreElements(); ) {
       
        String pName = (String) e.nextElement();
        A3CMLProperty prop = (A3CMLProperty) properties.get(pName);
        if (prop != null) {
          if (clone.properties == null) clone.properties = new Hashtable();
          clone.properties.put(pName, prop.duplicate());
        }
      }
    }
    if (nat != null) {
View Full Code Here

  }
   
  /* return the mapping between PL/SQL and LOG4J log levels in a hash table */
  public Hashtable getLogLevels()
  {
    Hashtable htLevels = new Hashtable();
    Statement statement;
    String SQLQuery = "SELECT LJLEVEL, LCODE, nvl(LSYSLOGEQUIV,LLEVEL)  LSYSLOGEQUIV " +
                        "FROM TLOGLEVEL " +
                    "ORDER BY LLEVEL";
    ResultSet rs = null;
    Connection jdbc_conn = null;
         
    if (formatOK == false)
    {
      logger.log(Level.FATAL, "Connection parameters are not OK");   
    }
    else
   
      try{
        // connect to database
        Class.forName("oracle.jdbc.driver.OracleDriver");
        jdbc_conn = DriverManager.getConnection(JDBCurl, DbUser, DbPass);
         
        logger.debug( "JDBC Connection OK: " + jdbc_conn.toString());
         
        // get the PL/SQL and corresponding LOG4J log levels
        statement = jdbc_conn.createStatement();
        rs = statement.executeQuery(SQLQuery);
           
        if (rs != null)
        {
          while(rs.next())
          {
            Level l = new DynamicLevel (rs.getInt("LJLEVEL"),rs.getString("LCODE"),rs.getInt("LSYSLOGEQUIV"));
                Integer levelint = new Integer(rs.getInt("LSYSLOGEQUIV"));
             
                htLevels.put(levelint, l);
          }
        }
         
        // close the connection
        jdbc_conn.close();   
View Full Code Here

   
    return;
  }

  private static void createConsumers(A3CMLServer root) throws Exception {
    consumers = new Hashtable();

    // Creates the local MessageConsumer: the Engine.
    engine = Engine.newInstance();
    addConsumer("local", engine);
View Full Code Here

    public final Hashtable getLog() {
      return log;
    }
   
    Context() {
      log = new Hashtable(15);
      bos = new ByteArrayOutputStream(256);
    }
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.