Class SpringCloudArtifactDescriptor

java.lang.Object
de.iip_ecosphere.platform.services.AbstractArtifactDescriptor<SpringCloudServiceDescriptor>
de.iip_ecosphere.platform.services.spring.SpringCloudArtifactDescriptor
All Implemented Interfaces:
de.iip_ecosphere.platform.services.ArtifactDescriptor

public class SpringCloudArtifactDescriptor extends de.iip_ecosphere.platform.services.AbstractArtifactDescriptor<SpringCloudServiceDescriptor>
A specific artifact descriptor for spring cloud services. [public for testing]
Author:
Holger Eichelberger, SSE
  • Field Details

    • jar

      private File jar
  • Constructor Details

    • SpringCloudArtifactDescriptor

      SpringCloudArtifactDescriptor(YamlArtifact artifact, URI uri, File jar, List<SpringCloudServiceDescriptor> services)
      Creates an artifact descriptor.
      Parameters:
      artifact - the Yaml artifact
      uri - the URI the descriptor was loaded from (jar may be a local file instead)
      jar - the underlying jar artifact
      services - the associated services
  • Method Details

    • createServersList

      private static List<SpringCloudServiceDescriptor> createServersList(YamlArtifact artifact)
      Creates a list of service descriptors for the servers in artifact.
      Parameters:
      artifact - the artifact
      Returns:
      the service descriptors
    • getJar

      public File getJar()
      Returns the underlying JAR file.
      Returns:
      the jar file
    • createInstance

      public static SpringCloudArtifactDescriptor createInstance(YamlArtifact artifact, URI uri, File jarFile)
      Creates a descriptor instance for a given YAML artifact and containing jarFile.
      Parameters:
      artifact - the artifact parsed from a YAML descriptor
      uri - the URI the jarFile was loaded from (jarFile may be a local file)
      jarFile - the JAR file containing the artifact
      Returns:
      the spring-specific descriptor
    • addService

      public void addService(SpringCloudServiceDescriptor service)
      Overrides:
      addService in class de.iip_ecosphere.platform.services.AbstractArtifactDescriptor<SpringCloudServiceDescriptor>