Codota Logo
Configuration.as
Code IndexAdd Codota to your IDE (free)

How to use
as
method
in
com.hotels.styx.api.configuration.Configuration

Best Java code snippets using com.hotels.styx.api.configuration.Configuration.as (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: HotelsDotCom/styx

@Override
public <X> X as(Class<X> type) {
  return configuration.as(type);
}
origin: HotelsDotCom/styx

  @Override
  public StyxService create(Environment environment, Configuration serviceConfiguration) {
    GraphiteConfig graphiteConfig = serviceConfiguration.as(GraphiteConfig.class);

    String host = graphiteConfig.host();
    int port = graphiteConfig.port();

    return new GraphiteReporterService.Builder()
        .serviceName(format("Graphite-Reporter-%s:%d", host, port))
        .prefix(graphiteConfig.prefix())
        .graphiteSender(new NonSanitizingGraphiteSender(host, port))
        .reportingInterval(graphiteConfig.intervalMillis(), MILLISECONDS)
        .metricRegistry(codaHaleMetricRegistry(environment))
        .build();
  }
}
com.hotels.styx.api.configurationConfigurationas

Popular methods of Configuration

  • get

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JPanel (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
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