Package pt.opensoft.field

Examples of pt.opensoft.field.Record


  public HostProxy getHostProxy () {
    return proxy;
  }

  public void config (Object ob) {
    Record nv = (Record) ob;
    String hostname = nv.getString("hostname");
    int port =        nv.getInt("port");
    int timeout =     nv.getInt("timeout");
        int threshold = -1;
       
        if(nv.containsName("threshold"))
            threshold =   nv.getInt("threshold");
       
        proxy = new HostProxyImpl(hostname, port, timeout, threshold);
  }
View Full Code Here


                _logger.error("[ResourceManager] Error opening config file:" + f.getAbsolutePath());
            }
            throw new IOException(e.toString());
        }

        Record resourceParameters;

        for (Enumeration e = prop.propertyNames(); e.hasMoreElements();) {

            resourceDispenserId = (String) e.nextElement();
            resourceParameters = ResourceConfig.fromNameValueString(resourceDispenserId, prop.getProperty(resourceDispenserId));

            try {

                resourceClass = (String) resourceParameters.getValue("type");
                Class newClass = Class.forName(resourceClass);
                resourceDispenser = (ResourceDispenser) newClass.newInstance();
                resourceDispenser.setId(resourceDispenserId);
                resourceDispenser.setLogger(_logger);
                resourceDispenser.setMaxWaiters(resourceParameters.getIntValue("maxWaiters", -1));
              _logger.info("[ResourceManager] initializing "+resourceDispenserId+"...");
                resourceDispenser.init(_configPath);
                _resourceDispensers.put(resourceDispenserId, resourceDispenser);

            } catch (ClassNotFoundException e1) {
View Full Code Here

TOP

Related Classes of pt.opensoft.field.Record

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.