Codota Logo
Service$Factory
Code IndexAdd Codota to your IDE (free)

How to use
Service$Factory
in
org.apache.calcite.avatica.remote

Best Java code snippets using org.apache.calcite.avatica.remote.Service$Factory (Showing top 4 results out of 315)

  • Common ways to obtain Service$Factory
private void myMethod () {
Service$Factory s =
  • Codota IconConnectionConfig connectionConfig;connectionConfig.factory()
  • Smart code suggestions by Codota
}
origin: com.aliyun.phoenix/ali-phoenix-queryserver-client

final Service service;
if (metaFactory != null) {
  service = metaFactory.create(connection);
} else if (config.url() != null) {
  final AvaticaHttpClient httpClient = getHttpClient(connection, config);
origin: org.apache.calcite/calcite-avatica

/**
 * Creates a {@link Service} with the given {@link AvaticaConnection} and configuration.
 *
 * @param connection The {@link AvaticaConnection} to use.
 * @param config Configuration properties
 * @return A Service implementation.
 */
Service createService(AvaticaConnection connection, ConnectionConfig config) {
 final Service.Factory metaFactory = config.factory();
 final Service service;
 if (metaFactory != null) {
  service = metaFactory.create(connection);
 } else if (config.url() != null) {
  final AvaticaHttpClient httpClient = getHttpClient(connection, config);
  final Serialization serializationType = getSerialization(config);
  switch (serializationType) {
  case JSON:
   service = new RemoteService(httpClient);
   break;
  case PROTOBUF:
   service = new RemoteProtobufService(httpClient, new ProtobufTranslationImpl());
   break;
  default:
   throw new IllegalArgumentException("Unhandled serialization type: " + serializationType);
  }
 } else {
  service = new MockJsonService(Collections.<String, String>emptyMap());
 }
 return service;
}
origin: org.apache.calcite.avatica/avatica-core

final Service service;
if (metaFactory != null) {
 service = metaFactory.create(connection);
} else if (config.url() != null) {
 final AvaticaHttpClient httpClient = getHttpClient(connection, config);
origin: apache/calcite-avatica

final Service service;
if (metaFactory != null) {
 service = metaFactory.create(connection);
} else if (config.url() != null) {
 final AvaticaHttpClient httpClient = getHttpClient(connection, config);
org.apache.calcite.avatica.remoteService$Factory

Javadoc

Factory that creates a Service.

Most used methods

  • create

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • orElseThrow (Optional)
  • runOnUiThread (Activity)
  • String (java.lang)
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
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