@Override public Filter createInboundFilter(Context context) { RestletCloudConfig restletCloudConfig = new RestletCloudConfig(); restletCloudConfig.setAgentCellId(agentCellId); restletCloudConfig.setAgentCellVersion(agentCellVersion); restletCloudConfig.setAgentServiceUrl(agentServiceUrl); restletCloudConfig.setAgentLogin(agentLogin); restletCloudConfig.setAgentPassword(agentPassword); restletCloudConfig.setReverseProxyEnabled(reverseProxyEnabled); restletCloudConfig.setReverseProxyTargetUrl(reverseProxyTargetUrl); restletCloudConfig.setAgentAnalyticsBufferSize(agentAnalyticsBufferSize); restletCloudConfig.setAgentAnalyticsPostPeriodInSecond(agentAnalyticsPostPeriodInSecond); restletCloudFilter = new RestletCloudFilter(context, restletCloudConfig, agentEnabled, firewallEnabled, firewallRules); if (agentEnabled && agentRefreshPeriodInSecond > 0) { TimerTask task = new AgentConfigurationTimerTask(restletCloudFilter); agentRefreshTimer = new Timer(true); long agentRefreshPeriodInMs = TimeUnit.SECONDS.toMillis(agentRefreshPeriodInSecond); agentRefreshTimer.scheduleAtFixedRate(task, agentRefreshPeriodInMs, agentRefreshPeriodInMs); LOGGER.info("Setting agent refresh timer every " + TimeUnit.SECONDS.toMinutes(agentRefreshPeriodInSecond) + " minutes"); } return restletCloudFilter; }
@Override public Filter createInboundFilter(Context context) { RestletCloudConfig restletCloudConfig = new RestletCloudConfig(); restletCloudConfig.setAgentCellId(agentCellId); restletCloudConfig.setAgentCellVersion(agentCellVersion); restletCloudConfig.setAgentServiceUrl(agentServiceUrl); restletCloudConfig.setAgentLogin(agentLogin); restletCloudConfig.setAgentPassword(agentPassword); restletCloudConfig.setReverseProxyEnabled(reverseProxyEnabled); restletCloudConfig.setReverseProxyTargetUrl(reverseProxyTargetUrl); restletCloudConfig.setAgentAnalyticsBufferSize(agentAnalyticsBufferSize); restletCloudConfig.setAgentAnalyticsPostPeriodInSecond(agentAnalyticsPostPeriodInSecond); restletCloudFilter = new RestletCloudFilter(context, restletCloudConfig, agentEnabled, firewallEnabled, firewallRules); if (agentEnabled && agentRefreshPeriodInSecond > 0) { TimerTask task = new AgentConfigurationTimerTask(restletCloudFilter); agentRefreshTimer = new Timer(true); long agentRefreshPeriodInMs = TimeUnit.SECONDS.toMillis(agentRefreshPeriodInSecond); agentRefreshTimer.scheduleAtFixedRate(task, agentRefreshPeriodInMs, agentRefreshPeriodInMs); LOGGER.info("Setting agent refresh timer every " + TimeUnit.SECONDS.toMinutes(agentRefreshPeriodInSecond) + " minutes"); } return restletCloudFilter; }
@Override public Filter createInboundFilter(Context context) { RestletCloudConfig restletCloudConfig = new RestletCloudConfig(); restletCloudConfig.setAgentCellId(agentCellId); restletCloudConfig.setAgentCellVersion(agentCellVersion); restletCloudConfig.setAgentServiceUrl(agentServiceUrl); restletCloudConfig.setAgentLogin(agentLogin); restletCloudConfig.setAgentPassword(agentPassword); restletCloudConfig.setReverseProxyEnabled(reverseProxyEnabled); restletCloudConfig.setReverseProxyTargetUrl(reverseProxyTargetUrl); restletCloudConfig.setAgentAnalyticsBufferSize(agentAnalyticsBufferSize); restletCloudConfig.setAgentAnalyticsPostPeriodInSecond(agentAnalyticsPostPeriodInSecond); restletCloudFilter = new RestletCloudFilter(context, restletCloudConfig, agentEnabled, firewallEnabled, firewallRules); if (agentEnabled && agentRefreshPeriodInSecond > 0) { TimerTask task = new AgentConfigurationTimerTask(restletCloudFilter); agentRefreshTimer = new Timer(true); long agentRefreshPeriodInMs = TimeUnit.SECONDS.toMillis(agentRefreshPeriodInSecond); agentRefreshTimer.scheduleAtFixedRate(task, agentRefreshPeriodInMs, agentRefreshPeriodInMs); LOGGER.info("Setting agent refresh timer every " + TimeUnit.SECONDS.toMinutes(agentRefreshPeriodInSecond) + " minutes"); } return restletCloudFilter; }
@Override public Filter createInboundFilter(Context context) { RestletCloudConfig restletCloudConfig = new RestletCloudConfig(); restletCloudConfig.setAgentCellId(agentCellId); restletCloudConfig.setAgentCellVersion(agentCellVersion); restletCloudConfig.setAgentServiceUrl(agentServiceUrl); restletCloudConfig.setAgentLogin(agentLogin); restletCloudConfig.setAgentPassword(agentPassword); restletCloudConfig.setReverseProxyEnabled(reverseProxyEnabled); restletCloudConfig.setReverseProxyTargetUrl(reverseProxyTargetUrl); restletCloudConfig.setAgentAnalyticsBufferSize(agentAnalyticsBufferSize); restletCloudConfig.setAgentAnalyticsPostPeriodInSecond(agentAnalyticsPostPeriodInSecond); restletCloudFilter = new RestletCloudFilter(context, restletCloudConfig, agentEnabled, firewallEnabled, firewallRules); if (agentEnabled && agentRefreshPeriodInSecond > 0) { TimerTask task = new AgentConfigurationTimerTask(restletCloudFilter); agentRefreshTimer = new Timer(true); long agentRefreshPeriodInMs = TimeUnit.SECONDS.toMillis(agentRefreshPeriodInSecond); agentRefreshTimer.scheduleAtFixedRate(task, agentRefreshPeriodInMs, agentRefreshPeriodInMs); LOGGER.info("Setting agent refresh timer every " + TimeUnit.SECONDS.toMinutes(agentRefreshPeriodInSecond) + " minutes"); } return restletCloudFilter; }