/** * @return the SSL Timeout */ public long getSSLTimeout() { return config.getLong(KEY_SSL_TIMEOUT, 90000L); }
/** * @return the Max amount of time to wait for a response to a request */ public long getMaxAgentResponseTime() { return config.getLong(KEY_MAX_RESPONSE_TIME, 5000L); }
/** * * @return */ public Long getConnectionTimeout() { return config.getLong(KEY_CONNECTION_TIMEOUT, 40000L); }
/** * @return the Max amount of time to allow a thread to run after simulation * time has been met */ public long getOverSimulationMaxTime() { return config.getLong(KEY_OVER_SIMULATION_MAX_TIME, (1000 * 60 * 60 * 2)); }
/** * @return the Max amount of time to wait for a response to a request */ public long getMaxAgentWaitTime() { return config.getLong(KEY_MAX_FAILED_WAIT_TIME, 180000L); }
/** * @param pollTime * @return */ public long getStatusReportIntervalMilis(long pollTime) { return config.getLong(KEY_POLL_TIME_MILIS, pollTime); }
@Override public void doConfigure(HierarchicalConfiguration configuration) throws ConfigurationException { super.doConfigure(configuration); if (isEnabled()) { // get the message size limit from the conf file and multiply // by 1024, to put it in bytes maxMessageSize = configuration.getLong("maxmessagesize", maxMessageSize) * 1024; if (maxMessageSize > 0) { LOGGER.info("The maximum allowed message size is {} bytes.", maxMessageSize); } else { LOGGER.info("No maximum message size is enforced for this server."); } // get the lmtpGreeting lmtpGreeting = configuration.getString("lmtpGreeting", null); } }
@SuppressWarnings("unchecked") public void configure(HierarchicalConfiguration config) throws ConfigurationException { List<String> rcpts= config.getList("spamTrapRecip"); if (rcpts.isEmpty() == false ) { setSpamTrapRecipients(rcpts); } else { throw new ConfigurationException("Please configure a spamTrapRecip."); } setBlockTime(config.getLong("blockTime",blockTime)); }
@Override protected void readAdditionalData(HierarchicalConfiguration zapAddOnData) { file = zapAddOnData.getString(FILE); size = zapAddOnData.getLong(SIZE); info = zapAddOnData.getString(INFO); hash = zapAddOnData.getString(HASH, null); }
public void doConfigure(final HierarchicalConfiguration configuration) throws ConfigurationException { if (isEnabled()) { HierarchicalConfiguration handlerConfiguration = configuration.configurationAt("handler"); // get the message size limit from the conf file and multiply // by 1024, to put it in bytes maxMessageSize = handlerConfiguration.getLong( "maxmessagesize",maxMessageSize ) * 1024; if (maxMessageSize > 0) { getLogger().info("The maximum allowed message size is " + maxMessageSize + " bytes."); } else { getLogger().info("No maximum message size is enforced for this server."); } // get the lmtpGreeting lmtpGreeting = handlerConfiguration.getString("lmtpGreeting",null); } }
@VisibleForTesting static ImapConfiguration getImapConfiguration(HierarchicalConfiguration configuration) { ImmutableSet<String> disabledCaps = ImmutableSet.copyOf(Splitter.on(CAPABILITY_SEPARATOR).split(configuration.getString("disabledCaps", ""))); return ImapConfiguration.builder() .enableIdle(configuration.getBoolean("enableIdle", ImapConfiguration.DEFAULT_ENABLE_IDLE)) .idleTimeInterval(configuration.getLong("idleTimeInterval", ImapConfiguration.DEFAULT_HEARTBEAT_INTERVAL_IN_SECONDS)) .idleTimeIntervalUnit(getTimeIntervalUnit(configuration.getString("idleTimeIntervalUnit", DEFAULT_TIME_UNIT))) .disabledCaps(disabledCaps) .build(); }
maxMessageSize = configuration.getLong("maxmessagesize", maxMessageSize) * 1024; if (maxMessageSize > 0) { LOGGER.info("The maximum allowed message size is {} bytes.", maxMessageSize);
public void configure(HierarchicalConfiguration handlerConfiguration) throws ConfigurationException { int tarpitRcptCount = handlerConfiguration.getInt("tarpitRcptCount", 0); long tarpitSleepTime = handlerConfiguration.getLong("tarpitSleepTime", 5000); if (tarpitRcptCount == 0) throw new ConfigurationException( "Please set the tarpitRcptCount bigger values as 0"); if (tarpitSleepTime == 0) throw new ConfigurationException( "Please set the tarpitSleepTimeto a bigger values as 0"); setTarpitRcptCount(tarpitRcptCount); setTarpitSleepTime(tarpitSleepTime); } }
maxMessageSize = handlerConfiguration.getLong( "maxmessagesize",maxMessageSize ) * 1024; if (maxMessageSize > 0) { getLogger().info("The maximum allowed message size is " + maxMessageSize + " bytes.");