/** * Helper method to obtain the maximum delay time any particular SMTP * message can be queued from a given configuration object. * * @param config a <code>Configuration</code> instance * @return maximum SMTP mail delay time */ private int getMaxDelayTime( Configuration config ) throws ConfigurationException { return config.getChild( "maximum-delay-time" ).getValueAsInteger( 0 ); }
/** * Helper method to obtain the maximum size any particular SMTP * message can be from a given configuration object. * * @param config a <code>Configuration</code> instance * @return maximum SMTP mail size */ private int getMaxSize( Configuration config ) throws ConfigurationException { return config.getChild( "maximum-size" ).getValueAsInteger( 1 ); }
int capacity = defaultConf.getValueAsInteger(DEFAULT_POOL_CAPACITY); if (capacity <= 0) if (!"default".equals(key)) capacity = nameVal[i].getValueAsInteger(poolCapacity); if (capacity < 0)
conf.getChild( "offset", true ).getValueAsInteger( 0 ); final int period = conf.getChild( "period", true ).getValueAsInteger( -1 ); conf.getChild( "minute" ).getValueAsInteger( -1 ); final int hour = conf.getChild( "hour" ).getValueAsInteger( -1 ); final int day = conf.getChild( "day" ).getValueAsInteger( -1 ); final int month = conf.getChild( "month" ).getValueAsInteger( -1 ); final int year = conf.getChild( "year" ).getValueAsInteger( -1 ); final boolean dayOfWeek = conf.getChild( "day" ).getAttributeAsBoolean( "week", false );
/** * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) */ public void configure(Configuration configuration) throws ConfigurationException { super.configure(configuration); this.maxArgLength = configuration.getChild("maxArgLength").getValueAsInteger(MAX_ARG_LENGTH); this.toStringBuilderClassName = configuration.getChild("toStringBuilderClass") .getValue(ArgumentToStringBuilderImpl.class.getName()); this.monitorAllExceptions = configuration.getChild("monitorAllExceptions").getValueAsBoolean(true); }
/** * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) */ public void configure(Configuration configuration) throws ConfigurationException { super.configure(configuration); this.maxArgLength = configuration.getChild("maxArgLength").getValueAsInteger(MAX_ARG_LENGTH); this.toStringBuilderClassName = configuration.getChild("toStringBuilderClass").getValue(ArgumentToStringBuilderImpl.class.getName()); this.monitorAllExceptions = configuration.getChild("monitorAllExceptions").getValueAsBoolean(true); }
tmpConf = conf.getChild("ftp-port", false); if(tmpConf != null) { miServerPort = tmpConf.getValueAsInteger(miServerPort); tmpConf = conf.getChild("max-connection", false); if(tmpConf != null) { miMaxLogin = tmpConf.getValueAsInteger(miMaxLogin); tmpConf = conf.getChild("anonymous-max-connection", false); if(tmpConf != null) { miAnonLogin = tmpConf.getValueAsInteger(miAnonLogin); tmpConf = conf.getChild("poll-interval", false); if(tmpConf != null) { miPollInterval = tmpConf.getValueAsInteger(miPollInterval); tmpConf = conf.getChild("remote-admin-port", false); if(tmpConf != null) { miRmiPort = tmpConf.getValueAsInteger(miRmiPort); tmpConf = conf.getChild("default-idle-time", false); if(tmpConf != null) { miDefaultIdle = tmpConf.getValueAsInteger(miDefaultIdle);
/** * Configure the cache using a Configuration object. */ public void configure(final Configuration configuration) throws ConfigurationException { final Configuration backend = configuration.getChild(Constants.CONFIG_BACKEND); final Configuration policy = configuration.getChild(Constants.CONFIG_POLICY); cacheConfiguration = new CacheConfiguration(); cacheConfiguration.setName(configuration.getChild(Constants.CONFIG_NAME).getValue(toString())); cacheConfiguration.setBackend(backend.getValue()); cacheConfiguration.setMaxSize(configuration.getChild(Constants.CONFIG_MAXSIZE).getValueAsInteger()); cacheConfiguration.setPolicy(policy.getValue()); cacheConfiguration.setTunerSleepTime(configuration.getChild(Constants.CONFIG_TUNER_SLEEPTIME).getValueAsInteger()); managedCacheClass = loadManagedCacheClass(backend.getLocation()); cacheMaintenancePolicyClass = loadCacheMaintenancePolicyClass(policy.getLocation()); }
child = cfg.getChild("min-columns", false); if (child != null) { getPDF417Bean().setMinCols(child.getValueAsInteger()); getPDF417Bean().setMaxCols(child.getValueAsInteger()); getPDF417Bean().setMinRows(child.getValueAsInteger()); getPDF417Bean().setMaxRows(child.getValueAsInteger()); getPDF417Bean().setColumns(child.getValueAsInteger()); getPDF417Bean().setErrorCorrectionLevel(cfg.getChild("ec-level").getValueAsInteger( PDF417Bean.DEFAULT_ERROR_CORRECTION_LEVEL));
/** * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) */ public void configure(Configuration configuration) throws ConfigurationException { super.configure(configuration); this.maxArgLength = configuration.getChild("maxArgLength").getValueAsInteger(MAX_ARG_LENGTH); Configuration tresholdConfiguration = configuration.getChild("tresholds"); this.tresholdList[0] = tresholdConfiguration.getChild("fatal").getAttributeAsInteger("millis", 5000); this.tresholdList[1] = tresholdConfiguration.getChild("error").getAttributeAsInteger("millis", 1000); this.tresholdList[2] = tresholdConfiguration.getChild("warn").getAttributeAsInteger("millis", 500); this.tresholdList[3] = tresholdConfiguration.getChild("info").getAttributeAsInteger("millis", 100); this.tresholdList[4] = tresholdConfiguration.getChild("debug").getAttributeAsInteger("millis", 10); }
/** * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) */ public void configure(Configuration configuration) throws ConfigurationException { super.configure(configuration); this.maxArgLength = configuration.getChild("maxArgLength").getValueAsInteger(MAX_ARG_LENGTH); Configuration tresholdConfiguration = configuration.getChild("tresholds"); this.tresholdList[0] = tresholdConfiguration.getChild("fatal").getAttributeAsInteger("millis", 5000); this.tresholdList[1] = tresholdConfiguration.getChild("error").getAttributeAsInteger("millis", 1000); this.tresholdList[2] = tresholdConfiguration.getChild("warn").getAttributeAsInteger("millis", 500); this.tresholdList[3] = tresholdConfiguration.getChild("info").getAttributeAsInteger("millis", 100); this.tresholdList[4] = tresholdConfiguration.getChild("debug").getAttributeAsInteger("millis", 10); }
configuration.getChild( "max-leased-samples" ).getValueAsInteger( 256 ); m_maxLeasedSampleSize = configuration.getChild( "max-leased-sample-size" ).getValueAsInteger( 2048 ); m_maxLeasedSampleLease = 1000L * configuration.getChild( "max-leased-sample-lease" ).getValueAsInteger( 86400 );
/** * Avalon Configurable Interface */ public void configure(Configuration config) throws ConfigurationException { super.configure(config); this.defaultInputConf = config.getChild("input-module"); this.defaultInput = this.defaultInputConf.getAttribute("name", this.defaultInput); this.separator = config.getChild("separator").getValue(this.separator); this.defaultPrefix = config.getChild("prefix").getValue(this.defaultPrefix); this.defaultSuffix = config.getChild("suffix").getValue(this.defaultSuffix); this.fixedName = config.getChild("fixed-attribute").getValue(this.fixedName); this.useFormName = config.getChild("use-form-name").getValueAsBoolean(this.useFormName); this.useFormNameTwice = config.getChild("use-form-name-twice").getValueAsBoolean(this.useFormNameTwice); this.useFormName = this.useFormName || this.useFormNameTwice; if (this.useFormName) { this.separator = (this.separator == null || this.separator.equals("") ? "/" : this.separator); this.defaultPrefix = this.separator; } this.ignoreValidation = config.getChild("ignore-validation").getValueAsBoolean(this.ignoreValidation); this.decorationSize = config.getChild("decoration").getValueAsInteger(this.decorationSize); this.stripNumber = config.getChild("strip-number").getValueAsBoolean(this.stripNumber); }
/** * Read reader configuration * * @deprecated use property injection instead */ public void configure(Configuration configuration) throws ConfigurationException { // VG Parameters are deprecated as of 2.2.0-Dev/2.1.6-Dev final Parameters parameters = Parameters.fromConfiguration(configuration); this.setExpires(parameters.getParameterAsLong("expires", CONFIGURED_EXPIRES_DEFAULT)); this.setQuickTest(parameters.getParameterAsBoolean("quick-modified-test", CONFIGURED_QUICK_TEST_DEFAULT)); this.setBufferSize(parameters.getParameterAsInteger("buffer-size", CONFIGURED_BUFFER_SIZE_DEFAULT)); this.setByteRanges(parameters.getParameterAsBoolean("byte-ranges", CONFIGURED_BYTE_RANGES_DEFAULT)); // Configuration has precedence over parameters. setExpires(configuration.getChild("expires").getValueAsLong(configuredExpires)); setQuickTest(configuration.getChild("quick-modified-test").getValueAsBoolean(configuredQuickTest)); setBufferSize(configuration.getChild("buffer-size").getValueAsInteger(configuredBufferSize)); setByteRanges(configuration.getChild("byte-ranges").getValueAsBoolean(configuredByteRanges)); }
.getValueAsInteger(RECONFIGURATION_DELAY_DEFAULT); this.disposalDelay = configuration.getChild(DISPOSAL_DELAY_KEY).getValueAsInteger(DISPOSAL_DELAY_DEFAULT);
configuration.getChild(RECONFIGURATION_DELAY_KEY).getValueAsInteger( RECONFIGURATION_DELAY_DEFAULT ); configuration.getChild(DISPOSAL_DELAY_KEY).getValueAsInteger( DISPOSAL_DELAY_DEFAULT );