Codota Logo
ComponentInstance.asExternal
Code IndexAdd Codota to your IDE (free)

How to use
asExternal
method
in
org.cloudml.core.ComponentInstance

Best Java code snippets using org.cloudml.core.ComponentInstance.asExternal (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: SINTEF-9012/cloudml

public ExternalComponentInstanceGroup onlyExternals() {
  final ExternalComponentInstanceGroup externalInstances = new ExternalComponentInstanceGroup();
  for (final T instance: this) {
    if (instance.isExternal()) {
      externalInstances.add(instance.asExternal());
    }
  }
  return externalInstances;
}

origin: SINTEF-9012/cloudml

  public String toString(){
    String result="   Component instances:\n";
    for(ComponentInstance c: components){
      if(c.isExternal()){
        if(c.asExternal().isVM()){
          result+="   VM-> "+c.asExternal().asVM().getId()+"::"+c.getName()+"\n";
        }else{
          result+="   External component-> "+c.getQualifiedName()+"\n";
        }
      }else{
        result+="   Instance component-> "+c.getQualifiedName()+"\n";
      }
    }
    return result;
  }
}
origin: SINTEF-9012/cloudml

/**
 * Extract the tag that can be identified on the given component instance.
 *
 * @param componentInstance the component whose tags are needed
 * @param tagged the already initialised maps of tags, to be filled in
 */
private void extractTags(ComponentInstance componentInstance, Map<String, List<String>> tagged) {
  assert componentInstance != null: "Unable to extract tags from 'null'";
  assert !tagged.isEmpty(): "The map of tag must have been initialized";
  if (componentInstance.isExternal()) {
    tagged.get(EXTERNAL.getLabel()).add(componentInstance.getName());
    if (componentInstance.asExternal().isVM()) {
      tagged.get(VM.getLabel()).add(componentInstance.getName());
    }
  }
  if (componentInstance.isInternal()) {
    tagged.get(INTERNAL.getLabel()).add(componentInstance.getName());
  }
  if (isService(componentInstance)) {
    tagged.get(SERVICE.getLabel()).add(componentInstance.getName());
  } else {
    tagged.get(NOT_SERVICE.getLabel()).add(componentInstance.getName());
  }
}
origin: SINTEF-9012/cloudml

public VMInstanceGroup onlyVMs() {
  final VMInstanceGroup selection = new VMInstanceGroup();
  for (final T instance: this) {
    if (instance.isExternal()) {
      final ExternalComponentInstance<? extends ExternalComponent> external = instance.asExternal();
      if (external.isVM()) {
        selection.add(external.asVM());
      }
    }
  }
  return selection;
}

origin: SINTEF-9012/cloudml

/**
 * @return the external component at the bottom of the underlying software
 * stack. For instance, if an application, is running on the top of a war
 * container, itself running on linux virtual machine, externalHost will
 * return the linux VM.
 */
public ExternalComponentInstance<? extends ExternalComponent> externalHost() {
  final ComponentInstance<? extends Component> directHost = getHost();
  if(directHost != null){
    if (directHost.isInternal()) {
      return directHost.asInternal().externalHost();
    }
    return directHost.asExternal();
  }else{
    return null;
  }
}
origin: SINTEF-9012/cloudml

for(Property p : c.getProperties()){
  if(p.getName().startsWith("env:")){
    if(c.getHost().asExternal().isVM()){
      prepareSetEnv(d,c,p);
origin: SINTEF-9012/cloudml

    .getComponentInstances()
    .firstNamed(sub)
    .asExternal();
ExternalComponent subEc = subEci.getType().asExternal();
String subEndPoint = subEc.getEndPoint();
origin: SINTEF-9012/cloudml

/**
 * For each component, execute the puppet manifest associated
 * @param components
 */
private void configureWithPuppet(ComponentInstanceGroup<InternalComponentInstance> components){
  unlessNotNull("Cannot configure null!", components);
  Connector jc;
  for (InternalComponentInstance ic : components) {
    if(ic.externalHost().isVM()){
      for(Resource r: ic.getType().getResources()){
        if(r instanceof PuppetResource){
          PuppetResource pr=(PuppetResource)r;
          if(!pr.getConfigurationFile().isEmpty()){
            journal.log(Level.INFO, ">> Using Puppet to configure the following component: "+ic.getName());
            VMInstance n= ic.getHost().asExternal().asVM();
            Provider p = n.getType().getProvider();
            managePuppet(pr,n, pr.getName(),pr.getConfigurationFile());
          }
        }
      }
    }
  }
}
origin: SINTEF-9012/cloudml

ci=lib.provision(targetModel,v).asExternal().asVM();
origin: SINTEF-9012/cloudml

  currentModel.getComponents().add(v);
ci=lib.provision(currentModel,v).asExternal().asVM();
return v;
origin: SINTEF-9012/cloudml

  target.getComponents().add(v);
VMInstance ci=lib.provision(target,v).asExternal().asVM();
return ci;
org.cloudml.coreComponentInstanceasExternal

Popular methods of ComponentInstance

  • getName
  • getType
  • isExternal
  • asInternal
  • getProvidedExecutionPlatforms
  • getProvidedPorts
  • isInternal
  • canHost
  • getQualifiedName
  • hostedComponents
  • accept
  • canBeUninstalled
  • accept,
  • canBeUninstalled,
  • clientComponents,
  • equals,
  • getDeployment,
  • getOwner,
  • instantiateAllExecutionPlatforms,
  • instantiateAllProvidedPorts,
  • isHosting

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • orElseThrow (Optional)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
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