Package co.cask.cdap.internal.service

Examples of co.cask.cdap.internal.service.DefaultServiceSpecification


   * @param application Custom Service {@link TwillApplication} to include in the Application
   */
  private void addService(TwillApplication application) {
    Preconditions.checkNotNull(application, "Service cannot be null.");

    DefaultServiceSpecification spec = new DefaultServiceSpecification(application.getClass().getName(),
                                                                       application.configure());
    services.put(spec.getName(), spec);
  }
View Full Code Here


    }
  }

  private static ServiceSpecification replaceRuntimeSpec(final String runnable, final ServiceSpecification spec,
                                                  final RuntimeSpecification runtimeSpec) {
    return new DefaultServiceSpecification(spec.getName(),
                                           new TwillSpecificationWithChangedRunnable(spec, runnable, runtimeSpec));
  }
View Full Code Here

  public ServiceSpecification deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
    throws JsonParseException {
    JsonObject jsonObj = (JsonObject) json;
    String className = jsonObj.get("classname").getAsString();
    TwillSpecification spec = adapter.fromJson(jsonObj.get("spec").getAsString());
    return new DefaultServiceSpecification(className, spec);
  }
View Full Code Here

TOP

Related Classes of co.cask.cdap.internal.service.DefaultServiceSpecification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.