Class MicroserviceSystem

java.lang.Object
edu.university.ecs.lab.common.models.MicroserviceSystem
All Implemented Interfaces:
JsonSerializable

public class MicroserviceSystem extends Object implements JsonSerializable
Represents the intermediate structure of a microservice system.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    adopt(Microservice microservice)
    Given a new or modified microservice, we must adopt awaiting orphans based on their file paths containing the microservices (folder) path
    Returns the microservice that matches the passed name
    void
    orphanize(Microservice microservice)
    Given an existing microservice, if it must now be orphanized then all JClasses belonging to that service will be added to the system's pool of orphans for later use
    com.google.gson.JsonObject
    Construct a JSON object representing the given ms system name, version, and microservice data map.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MicroserviceSystem

      public MicroserviceSystem()
  • Method Details

    • toJsonObject

      public com.google.gson.JsonObject toJsonObject()
      Construct a JSON object representing the given ms system name, version, and microservice data map.
      Specified by:
      toJsonObject in interface JsonSerializable
      Returns:
      the constructed JSON object
    • findMicroserviceByName

      public Microservice findMicroserviceByName(String name)
      Returns the microservice that matches the passed name
      Parameters:
      name - the name to search for
      Returns:
      microservice whose name matches or null if not found
    • orphanize

      public void orphanize(Microservice microservice)
      Given an existing microservice, if it must now be orphanized then all JClasses belonging to that service will be added to the system's pool of orphans for later use
      Parameters:
      microservice - the microservice to orphanize
    • adopt

      public void adopt(Microservice microservice)
      Given a new or modified microservice, we must adopt awaiting orphans based on their file paths containing the microservices (folder) path
      Parameters:
      microservice - the microservice adopting orphans