Codota Logo
RestletCloudConfig
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain RestletCloudConfig
private void myMethod () {
RestletCloudConfig r =
  • Codota Iconnew RestletCloudConfig()
  • Smart code suggestions by Codota
}
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.gae/org.restlet.ext.platform

    .<CallLog> newArrayListWithExpectedSize(bufferSize));
bufferSize = restletCloudConfig.getAgentAnalyticsBufferSize();
executorService = new ThreadPoolExecutor(1, THREAD_MAX_NUMBER, 0L,
    TimeUnit.SECONDS,
        .build());
postPeriodInSecond = restletCloudConfig.getAgentAnalyticsPostPeriodInSecond();
long postPeriodInMs = TimeUnit.SECONDS.toMillis(postPeriodInSecond);
origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Terminates the agent if the service's configuration is not correctly set.
 * 
 * @param config
 *            The service's configuration
 */
public void validateAgentConfiguration(RestletCloudConfig config) {
  if (config.getAgentCellId() == null) {
    throw new IllegalArgumentException(
        "The cell identifier is mandatory");
  }
  if (config.getAgentCellId() == null) {
    throw new IllegalArgumentException(
        "The cell version identifier is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentServiceUrl())) {
    throw new IllegalArgumentException(
        "The agent service url is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentLogin())) {
    throw new IllegalArgumentException("The agent login is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentPassword())) {
    throw new IllegalArgumentException(
        "The agent password key is mandatory");
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

  /**
   * Validates the redirection URL
   * 
   * @param config
   *            The service's configuration
   */
  public void validateRedirection(RestletCloudConfig config) {
    if (config.isReverseProxyEnabled()
        && StringUtils.isNullOrEmpty(config.getReverseProxyTargetUrl())) {
      throw new IllegalArgumentException(
          "The redirection url is mandatory when redirection is enabled");
    }
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

  String resourcePath) {
StringBuilder sb = new StringBuilder(
    restletCloudConfig.getAgentServiceUrl());
if (!restletCloudConfig.getAgentServiceUrl().endsWith("/")) {
  sb.append("/");
sb.append(restletCloudConfig.getAgentCellId());
sb.append("/versions/");
sb.append(restletCloudConfig.getAgentCellVersion());
if (resourcePath != null) {
  if (!resourcePath.startsWith("/")) {
origin: org.restlet.gae/org.restlet.ext.platform

restletCloudConfig.getAgentLogin(),
restletCloudConfig.getAgentPassword());
origin: org.restlet.jee/org.restlet.ext.platform

  String resourcePath) {
StringBuilder sb = new StringBuilder(
    restletCloudConfig.getAgentServiceUrl());
if (!restletCloudConfig.getAgentServiceUrl().endsWith("/")) {
  sb.append("/");
sb.append(restletCloudConfig.getAgentCellId());
sb.append("/versions/");
sb.append(restletCloudConfig.getAgentCellVersion());
if (resourcePath != null) {
  if (!resourcePath.startsWith("/")) {
origin: org.restlet.jse/org.restlet.ext.platform

  /**
   * Validates the redirection URL
   * 
   * @param config
   *            The service's configuration
   */
  public void validateRedirection(RestletCloudConfig config) {
    if (config.isReverseProxyEnabled()
        && StringUtils.isNullOrEmpty(config.getReverseProxyTargetUrl())) {
      throw new IllegalArgumentException(
          "The redirection url is mandatory when redirection is enabled");
    }
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

restletCloudConfig.getAgentLogin(),
restletCloudConfig.getAgentPassword());
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

/**
 * Terminates the agent if the service's configuration is not correctly set.
 * 
 * @param config
 *            The service's configuration
 */
public void validateAgentConfiguration(RestletCloudConfig config) {
  if (config.getAgentCellId() == null) {
    throw new IllegalArgumentException(
        "The cell identifier is mandatory");
  }
  if (config.getAgentCellId() == null) {
    throw new IllegalArgumentException(
        "The cell version identifier is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentServiceUrl())) {
    throw new IllegalArgumentException(
        "The agent service url is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentLogin())) {
    throw new IllegalArgumentException("The agent login is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentPassword())) {
    throw new IllegalArgumentException(
        "The agent password key is mandatory");
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

  String resourcePath) {
StringBuilder sb = new StringBuilder(
    restletCloudConfig.getAgentServiceUrl());
if (!restletCloudConfig.getAgentServiceUrl().endsWith("/")) {
  sb.append("/");
sb.append(restletCloudConfig.getAgentCellId());
sb.append("/versions/");
sb.append(restletCloudConfig.getAgentCellVersion());
if (resourcePath != null) {
  if (!resourcePath.startsWith("/")) {
origin: org.restlet.jee/org.restlet.ext.platform

  /**
   * Validates the redirection URL
   * 
   * @param config
   *            The service's configuration
   */
  public void validateRedirection(RestletCloudConfig config) {
    if (config.isReverseProxyEnabled()
        && StringUtils.isNullOrEmpty(config.getReverseProxyTargetUrl())) {
      throw new IllegalArgumentException(
          "The redirection url is mandatory when redirection is enabled");
    }
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

    .<CallLog> newArrayListWithExpectedSize(bufferSize));
bufferSize = restletCloudConfig.getAgentAnalyticsBufferSize();
executorService = new ThreadPoolExecutor(1, THREAD_MAX_NUMBER, 0L,
    TimeUnit.SECONDS,
        .build());
postPeriodInSecond = restletCloudConfig.getAgentAnalyticsPostPeriodInSecond();
long postPeriodInMs = TimeUnit.SECONDS.toMillis(postPeriodInSecond);
origin: org.restlet.jee/org.restlet.ext.platform

restletCloudConfig.getAgentLogin(),
restletCloudConfig.getAgentPassword());
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.osgi/org.restlet.ext.platform

/**
 * Terminates the agent if the service's configuration is not correctly set.
 * 
 * @param config
 *            The service's configuration
 */
public void validateAgentConfiguration(RestletCloudConfig config) {
  if (config.getAgentCellId() == null) {
    throw new IllegalArgumentException(
        "The cell identifier is mandatory");
  }
  if (config.getAgentCellId() == null) {
    throw new IllegalArgumentException(
        "The cell version identifier is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentServiceUrl())) {
    throw new IllegalArgumentException(
        "The agent service url is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentLogin())) {
    throw new IllegalArgumentException("The agent login is mandatory");
  }
  if (StringUtils.isNullOrEmpty(config.getAgentPassword())) {
    throw new IllegalArgumentException(
        "The agent password key is mandatory");
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

  String resourcePath) {
StringBuilder sb = new StringBuilder(
    restletCloudConfig.getAgentServiceUrl());
if (!restletCloudConfig.getAgentServiceUrl().endsWith("/")) {
  sb.append("/");
sb.append(restletCloudConfig.getAgentCellId());
sb.append("/versions/");
sb.append(restletCloudConfig.getAgentCellVersion());
if (resourcePath != null) {
  if (!resourcePath.startsWith("/")) {
origin: org.restlet.osgi/org.restlet.ext.platform

  /**
   * Validates the redirection URL
   * 
   * @param config
   *            The service's configuration
   */
  public void validateRedirection(RestletCloudConfig config) {
    if (config.isReverseProxyEnabled()
        && StringUtils.isNullOrEmpty(config.getReverseProxyTargetUrl())) {
      throw new IllegalArgumentException(
          "The redirection url is mandatory when redirection is enabled");
    }
  }
}
origin: org.restlet.jee/org.restlet.ext.platform

    .<CallLog> newArrayListWithExpectedSize(bufferSize));
bufferSize = restletCloudConfig.getAgentAnalyticsBufferSize();
executorService = new ThreadPoolExecutor(1, THREAD_MAX_NUMBER, 0L,
    TimeUnit.SECONDS,
        .build());
postPeriodInSecond = restletCloudConfig.getAgentAnalyticsPostPeriodInSecond();
long postPeriodInMs = TimeUnit.SECONDS.toMillis(postPeriodInSecond);
org.restlet.ext.platform.internalRestletCloudConfig

Javadoc

TODO I'm not convinced by the presence of such configuration bean. The service really hosts the configuration.

Most used methods

  • <init>
  • getAgentAnalyticsBufferSize
  • getAgentAnalyticsPostPeriodInSecond
  • getAgentCellId
  • getAgentCellVersion
  • getAgentLogin
  • getAgentPassword
  • getAgentServiceUrl
  • getReverseProxyTargetUrl
  • isReverseProxyEnabled
  • setAgentAnalyticsBufferSize
  • setAgentAnalyticsPostPeriodInSecond
  • setAgentAnalyticsBufferSize,
  • setAgentAnalyticsPostPeriodInSecond,
  • setAgentCellId,
  • setAgentCellVersion,
  • setAgentLogin,
  • setAgentPassword,
  • setAgentServiceUrl,
  • setReverseProxyEnabled,
  • setReverseProxyTargetUrl

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now