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

How to use
ConfigurationException
in
org.metricssampler.config

Best Java code snippets using org.metricssampler.config.ConfigurationException (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: com.github.dimovelev/metrics-sampler-core

@Override
public SharedResource getSharedResource(final String name) {
  final SharedResource result = sharedResources.get(name);
  if (result == null) {
    throw new ConfigurationException("Shared resource \"" + name + "\" not found");
  }
  return result;
}
origin: com.github.dimovelev/metrics-sampler-extension-webmethods

protected DateFormat parseDateFormat() {
  try {
    return new SimpleDateFormat(dateformat != null ? dateformat : DEFAULT_DATE_FORMAT);
  } catch (final IllegalArgumentException e) {
    throw new ConfigurationException("Failed to parse date format: \"" + dateformat + "\"");
  }
}
origin: com.github.dimovelev/metrics-sampler-core

public static void notNull(final Object xbean, final String name, final Object value) {
  if (value == null) {
    throw new ConfigurationException("Element \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
}
origin: dimovelev/metrics-sampler

  public static void validPattern(final Object xbean, final String name, final String value) {
    if (value != null) {
      try {
        Pattern.compile(value);
      } catch (final PatternSyntaxException e) {
        throw new ConfigurationException("Value \"" + value + "\" of attribute \"" + name + "\" of " + determineBeanName(xbean) + " must be a valid regular expression but compiling it failed with error: " + e.getMessage(), e);
      }
    }
  }
}
origin: com.github.dimovelev/metrics-sampler-core

public static void notEmpty(final Object xbean, final String name, final String value) {
  if (value == null || value.equals("")) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
}
origin: com.github.dimovelev/metrics-sampler-core

public static void validPort(final Object xbean, final String name, final Integer value) {
  if (value == null) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
  if (value < 1 || value > 65535) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean)  + " with value " + value + " is not a valid port in range [1,65535]");
  }
}
origin: com.github.dimovelev/metrics-sampler-core

public static void notNegative(final Object xbean, final String name, final Integer value) {
  if (value == null) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
  if (value < 0) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " with value " + value + " is not a valid number greater than or equal to 0");
  }
}
origin: com.github.dimovelev/metrics-sampler-core

  public static void validPattern(final Object xbean, final String name, final String value) {
    if (value != null) {
      try {
        Pattern.compile(value);
      } catch (final PatternSyntaxException e) {
        throw new ConfigurationException("Value \"" + value + "\" of attribute \"" + name + "\" of " + determineBeanName(xbean) + " must be a valid regular expression but compiling it failed with error: " + e.getMessage(), e);
      }
    }
  }
}
origin: com.github.dimovelev/metrics-sampler-core

public static void notEmpty(final Object xbean, final String name, final Collection<?> value) {
  if (value == null || value.isEmpty()) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
}
origin: com.github.dimovelev/metrics-sampler-core

public static void notNegativeOptional(final Object xbean, final String name, final Integer value) {
  if (value != null) {
    if (value < 0) {
      throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " with value " + value + " is not a valid number greater than or equal to 0");
    }
  }
}
origin: com.github.dimovelev/metrics-sampler-core

  protected URL parseUrl() {
    try {
      return new URL(getUrl());
    } catch (final MalformedURLException e) {
      throw new ConfigurationException("Invalid URL: " + e.getMessage());
    }
  }
}
origin: dimovelev/metrics-sampler

public static void greaterThanZero(final Object xbean, final String name, final Integer value) {
  if (value == null) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
  if (value < 1) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " with value " + value + " is not a valid number greater than 0");
  }
}
origin: com.github.dimovelev/metrics-sampler-core

public static void greaterThanZero(final Object xbean, final String name, final Integer value) {
  if (value == null) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
  if (value < 1) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " with value " + value + " is not a valid number greater than 0");
  }
}
origin: com.github.dimovelev/metrics-sampler-core

private void applyPostProcessing(XBean bean) {
  try {
    for (final XBeanPostProcessor postProcessor : xbeanPostProcessors) {
      postProcessor.postProcessAfterLoad(bean);
    }
  } catch (IllegalAccessException|InvocationTargetException|NoSuchMethodException e) {
    throw new ConfigurationException("Failed to execute post processors", e);
  }
}
origin: dimovelev/metrics-sampler

public static void notNegative(final Object xbean, final String name, final Integer value) {
  if (value == null) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
  if (value < 0) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " with value " + value + " is not a valid number greater than or equal to 0");
  }
}
origin: dimovelev/metrics-sampler

private void applyPostProcessing(XBean bean) {
  try {
    for (final XBeanPostProcessor postProcessor : xbeanPostProcessors) {
      postProcessor.postProcessAfterLoad(bean);
    }
  } catch (IllegalAccessException|InvocationTargetException|NoSuchMethodException e) {
    throw new ConfigurationException("Failed to execute post processors", e);
  }
}
origin: dimovelev/metrics-sampler

public static void notNull(final Object xbean, final String name, final Object value) {
  if (value == null) {
    throw new ConfigurationException("Element \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
}
origin: dimovelev/metrics-sampler

public static void notEmpty(final Object xbean, final String name, final String value) {
  if (value == null || value.equals("")) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
}
origin: dimovelev/metrics-sampler

  protected URL parseUrl() {
    try {
      return new URL(getUrl());
    } catch (final MalformedURLException e) {
      throw new ConfigurationException("Invalid URL: " + e.getMessage());
    }
  }
}
origin: dimovelev/metrics-sampler

public static void validPort(final Object xbean, final String name, final Integer value) {
  if (value == null) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean) + " is mandatory");
  }
  if (value < 1 || value > 65535) {
    throw new ConfigurationException("Attribute \"" + name + "\" of " + determineBeanName(xbean)  + " with value " + value + " is not a valid port in range [1,65535]");
  }
}
org.metricssampler.configConfigurationException

Javadoc

Exception indicating an unrecoverable problem in the application configuration.

Most used methods

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Kernel (java.awt.image)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • JTextField (javax.swing)
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