Package java.util

Examples of java.util.Enumeration


    protected void close() {
      socket.close();
    }

    protected void shutdown() {
      Enumeration enumSrvInfo = serversInfo.elements();
      while (enumSrvInfo.hasMoreElements()) {
        ServerInfo srvInfo = (ServerInfo) enumSrvInfo.nextElement();
        if (srvInfo.messageIncomingBuilder != null) {
          srvInfo.messageIncomingBuilder.shutdown();
        }
      }
      close();
View Full Code Here


            if (!running) {
              break;
            }

            Enumeration enuAddr = serversInfo.keys();
            long currentTimeMillis = System.currentTimeMillis();
           
            while (enuAddr.hasMoreElements()) {
              SocketAddress addr = (SocketAddress) enuAddr.nextElement();
              ServerInfo servInfo = (ServerInfo) serversInfo.get(addr);
             
              synchronized (servInfo.lock) {
               
                if (!hasBeenForced
View Full Code Here

public class GZIPFilter implements Filter {

  private List ignore_pages = new ArrayList();
 
  public void init(FilterConfig filterConfig) {
    Enumeration pnames = filterConfig.getInitParameterNames();
    while(pnames.hasMoreElements()){
      String param = (String)pnames.nextElement();
      if(param.startsWith("ignore")){
        ignore_pages.add(filterConfig.getInitParameter(param));
      }
    }
  }
View Full Code Here

  public String getStatusInfo() {
    return AgentServer.getStatusInfo();
  }

  public String[] getServers() {
    Enumeration e = AgentServer.elementsServerDesc();
    String[] servers = new String[AgentServer.getServerNb()];
    StringBuffer strBuf = new StringBuffer();
    for (int i=0; e.hasMoreElements(); i++) {
      ServerDesc server = (ServerDesc) e.nextElement();
      strBuf.append("sid=").append(server.sid);
      strBuf.append(",name=").append(server.name);
      if (server.gateway == -1) {
        strBuf.append(",gateway=").append(server.gateway);
      } else {
View Full Code Here

      // add cluster properties
      if (cluster != null
          && cluster.properties != null
          && cluster.properties.size() > 0) {
        Enumeration e = cluster.properties.elements();
        do {
          A3CMLProperty p = (A3CMLProperty) e.nextElement();
          Configuration.putProperty(p.name, p.value);

          if (logmon.isLoggable(BasicLevel.DEBUG))
            logmon.log(BasicLevel.DEBUG,
                       getName() + " : Adds cluster property: " +
                       p.name + " = " + p.value);
        } while (e.hasMoreElements());
      }
      if (cluster != null)
        server = cluster.getServer(cid);
    } else {
      server = a3config.getServer(sid);
    }

    // add server properties
    if (server != null && server.properties != null) {
      Enumeration e = server.properties.elements();
      do {
        A3CMLProperty p = (A3CMLProperty) e.nextElement();
        Configuration.putProperty(p.name, p.value);

        if (logmon.isLoggable(BasicLevel.DEBUG))
          logmon.log(BasicLevel.DEBUG,
                     getName() + " : Adds server property: " +
                     p.name + " = " + p.value);
      } while (e.hasMoreElements());
    }
  }
View Full Code Here

      }
      status.value = Status.RESETING;
    }

    // Remove all consumers Mbean
    Enumeration e = getConsumers();
    if (e != null) {
      for (; e.hasMoreElements();) {
        MessageConsumer cons = (MessageConsumer) e.nextElement();
        try {
          MXWrapper.unregisterMBean("AgentServer", "server=" + getName() + ",cons=" + cons.getName());
        } catch (Exception exc) {
          logmon.log(BasicLevel.DEBUG,
                     getName() + ", jmx failed: " + "server=" + getName() + ",cons=" + cons.getName(), exc);
View Full Code Here

     * loop through properties and print them with their property-name
     * as elementname
     */
    private void writeProperties(INode node, int level)
                          throws IOException {
        Enumeration e = null;

        if (dbmode && node instanceof Node) {
            // a newly constructed db.Node doesn't have a propMap,
            // but returns an enumeration of all it's db-mapped properties
            Hashtable props = ((Node) node).getPropMap();

            if (props == null) {
                return;
            }

            e = props.keys();
        } else {
            e = node.properties();
        }

        while (e.hasMoreElements()) {
            String key = (String) e.nextElement();
            if (dbmode && key.charAt(0) == '_') {
                continue;
            }
            IProperty prop = node.get(key);

View Full Code Here

            if ((smap != null) && smap.isRelational()) {
                return;
            }
        }

        Enumeration e = node.getSubnodes();

        while (e.hasMoreElements()) {
            INode nextNode = (INode) e.nextElement();

            write(nextNode, "hop:child", null, level);
        }
    }
View Full Code Here

      StringBuffer text = new StringBuffer();
      text.append("\n\nDatabaseSaver options:\n");
      try {
  DatabaseSaver asv = new DatabaseSaver();
        try {
          Enumeration enumi = asv.listOptions();
          while (enumi.hasMoreElements()) {
            Option option = (Option)enumi.nextElement();
            text.append(option.synopsis()+'\n');
            text.append(option.description()+'\n');
       
          asv.setOptions(options);
          asv.setDestination();
View Full Code Here

    catch(Exception ex) {
  printException(ex);
        StringBuffer text = new StringBuffer();
        if(m_query.equals("Select * from Results0")){
            text.append("\n\nDatabaseLoader options:\n");
            Enumeration enumi = listOptions();
            while (enumi.hasMoreElements()) {
                Option option = (Option)enumi.nextElement();
                text.append(option.synopsis()+'\n');
                text.append(option.description()+'\n');
            }
            System.out.println(text);
        }
View Full Code Here

TOP

Related Classes of java.util.Enumeration

Copyright © 2015 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.