congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RestletCloudFilter
Code IndexAdd Tabnine to your IDE (free)

How to use
RestletCloudFilter
in
org.restlet.ext.platform.internal

Best Java code snippets using org.restlet.ext.platform.internal.RestletCloudFilter (Showing top 16 results out of 315)

origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Create a new RestletCloudFilter with the specified configuration.
 * 
 * @param context
 *            The current context.
 * @param restletCloudConfig
 *            The RestletCloudService configuration.
 */
public RestletCloudFilter(Context context, RestletCloudConfig restletCloudConfig,
             boolean agentEnabled, boolean firewallEnabled,
             List<FirewallRule> firewallRules) {
  super(context);
  this.firewallRules = firewallRules;
  this.firewallEnabled = firewallEnabled;
  this.restletCloudConfig = restletCloudConfig;
  this.agentEnabled = agentEnabled;
  this.context = context;
  validateRedirection(restletCloudConfig);
  if (agentEnabled) {
    validateAgentConfiguration(restletCloudConfig);
    modulesSettings = ModulesSettingsModule.getModulesSettings(
        restletCloudConfig, null);
  }
  refreshRestletCloudFilter();
}
origin: org.restlet.jee/org.restlet.ext.platform

  @Override
  public void run() {
    agentFilter.refreshRestletCloudFilterIfRevisionChanged();
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Retrieves the modules settings from the service and updates the filter.
 */
public void refreshRestletCloudFilterIfRevisionChanged() {
  try {
    ModulesSettings newModulesSettings = ModulesSettingsModule
        .getModulesSettings(restletCloudConfig, modulesSettings);
    if (newModulesSettings != null) {
      modulesSettings = newModulesSettings;
      LOGGER.info("Updating modules settings");
      refreshRestletCloudFilter();
    }
  } catch (Exception e) {
    LOGGER.log(Level.WARNING,
        "Unable to retrieve agent settings from platform", e);
  }
}
origin: org.restlet.jee/org.restlet.ext.platform

@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;
}
origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Retrieves the modules settings from the service and updates the filter.
 */
public void refreshRestletCloudFilterIfRevisionChanged() {
  try {
    ModulesSettings newModulesSettings = ModulesSettingsModule
        .getModulesSettings(restletCloudConfig, modulesSettings);
    if (newModulesSettings != null) {
      modulesSettings = newModulesSettings;
      LOGGER.info("Updating modules settings");
      refreshRestletCloudFilter();
    }
  } catch (Exception e) {
    LOGGER.log(Level.WARNING,
        "Unable to retrieve agent settings from platform", e);
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

@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;
}
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Create a new RestletCloudFilter with the specified configuration.
 * 
 * @param context
 *            The current context.
 * @param restletCloudConfig
 *            The RestletCloudService configuration.
 */
public RestletCloudFilter(Context context, RestletCloudConfig restletCloudConfig,
             boolean agentEnabled, boolean firewallEnabled,
             List<FirewallRule> firewallRules) {
  super(context);
  this.firewallRules = firewallRules;
  this.firewallEnabled = firewallEnabled;
  this.restletCloudConfig = restletCloudConfig;
  this.agentEnabled = agentEnabled;
  this.context = context;
  validateRedirection(restletCloudConfig);
  if (agentEnabled) {
    validateAgentConfiguration(restletCloudConfig);
    modulesSettings = ModulesSettingsModule.getModulesSettings(
        restletCloudConfig, null);
  }
  refreshRestletCloudFilter();
}
origin: org.restlet.gae/org.restlet.ext.platform

  @Override
  public void run() {
    agentFilter.refreshRestletCloudFilterIfRevisionChanged();
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

/**
 * Retrieves the modules settings from the service and updates the filter.
 */
public void refreshRestletCloudFilterIfRevisionChanged() {
  try {
    ModulesSettings newModulesSettings = ModulesSettingsModule
        .getModulesSettings(restletCloudConfig, modulesSettings);
    if (newModulesSettings != null) {
      modulesSettings = newModulesSettings;
      LOGGER.info("Updating modules settings");
      refreshRestletCloudFilter();
    }
  } catch (Exception e) {
    LOGGER.log(Level.WARNING,
        "Unable to retrieve agent settings from platform", e);
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

@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;
}
origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Create a new RestletCloudFilter with the specified configuration.
 * 
 * @param context
 *            The current context.
 * @param restletCloudConfig
 *            The RestletCloudService configuration.
 */
public RestletCloudFilter(Context context, RestletCloudConfig restletCloudConfig,
             boolean agentEnabled, boolean firewallEnabled,
             List<FirewallRule> firewallRules) {
  super(context);
  this.firewallRules = firewallRules;
  this.firewallEnabled = firewallEnabled;
  this.restletCloudConfig = restletCloudConfig;
  this.agentEnabled = agentEnabled;
  this.context = context;
  validateRedirection(restletCloudConfig);
  if (agentEnabled) {
    validateAgentConfiguration(restletCloudConfig);
    modulesSettings = ModulesSettingsModule.getModulesSettings(
        restletCloudConfig, null);
  }
  refreshRestletCloudFilter();
}
origin: org.restlet.osgi/org.restlet.ext.platform

  @Override
  public void run() {
    agentFilter.refreshRestletCloudFilterIfRevisionChanged();
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Retrieves the modules settings from the service and updates the filter.
 */
public void refreshRestletCloudFilterIfRevisionChanged() {
  try {
    ModulesSettings newModulesSettings = ModulesSettingsModule
        .getModulesSettings(restletCloudConfig, modulesSettings);
    if (newModulesSettings != null) {
      modulesSettings = newModulesSettings;
      LOGGER.info("Updating modules settings");
      refreshRestletCloudFilter();
    }
  } catch (Exception e) {
    LOGGER.log(Level.WARNING,
        "Unable to retrieve agent settings from platform", e);
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

@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;
}
origin: org.restlet.osgi/org.restlet.ext.platform

/**
 * Create a new RestletCloudFilter with the specified configuration.
 * 
 * @param context
 *            The current context.
 * @param restletCloudConfig
 *            The RestletCloudService configuration.
 */
public RestletCloudFilter(Context context, RestletCloudConfig restletCloudConfig,
             boolean agentEnabled, boolean firewallEnabled,
             List<FirewallRule> firewallRules) {
  super(context);
  this.firewallRules = firewallRules;
  this.firewallEnabled = firewallEnabled;
  this.restletCloudConfig = restletCloudConfig;
  this.agentEnabled = agentEnabled;
  this.context = context;
  validateRedirection(restletCloudConfig);
  if (agentEnabled) {
    validateAgentConfiguration(restletCloudConfig);
    modulesSettings = ModulesSettingsModule.getModulesSettings(
        restletCloudConfig, null);
  }
  refreshRestletCloudFilter();
}
origin: org.restlet.jse/org.restlet.ext.platform

  @Override
  public void run() {
    agentFilter.refreshRestletCloudFilterIfRevisionChanged();
  }
}
org.restlet.ext.platform.internalRestletCloudFilter

Most used methods

  • <init>
    Create a new RestletCloudFilter with the specified configuration.
  • refreshRestletCloudFilter
    Updates the filter with its modules settings.
  • refreshRestletCloudFilterIfRevisionChanged
    Retrieves the modules settings from the service and updates the filter.
  • validateAgentConfiguration
    Terminates the agent if the service's configuration is not correctly set.
  • validateRedirection
    Validates the redirection URL

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now