Class DataHolder


  • public class DataHolder
    extends java.lang.Object
    DataHolder for Swagger component.
    Since:
    2.4.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMicroserviceRegistry​(java.lang.String registryId, org.wso2.msf4j.MicroservicesRegistry microservicesRegistry)
      Add MicroservicesRegistry with the given registry Id.
      static DataHolder getInstance()
      Get DataHolder object.
      java.util.Map<java.lang.String,​org.wso2.msf4j.MicroservicesRegistry> getMicroserviceRegistries()
      Get all the MicroservicesRegistries
      org.wso2.msf4j.MicroservicesRegistry getMicroserviceRegistry​(java.lang.String registryId)
      Get available MicroservicesRegistry for the gievn registry Id.
      java.util.Map<java.lang.String,​org.wso2.msf4j.MicroservicesRegistry> getMicroservicesRegistries()
      Get available MicroservicesRegistries.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static DataHolder getInstance()
        Get DataHolder object.
        Returns:
        DataHolder instance.
      • getMicroservicesRegistries

        public java.util.Map<java.lang.String,​org.wso2.msf4j.MicroservicesRegistry> getMicroservicesRegistries()
        Get available MicroservicesRegistries.
        Returns:
        Map of available MicroservicesRegistries.
      • getMicroserviceRegistry

        public org.wso2.msf4j.MicroservicesRegistry getMicroserviceRegistry​(java.lang.String registryId)
        Get available MicroservicesRegistry for the gievn registry Id.
        Parameters:
        registryId - of the registry need to be pick
        Returns:
        MicroservicesRegistry object if the given Id.
      • addMicroserviceRegistry

        public void addMicroserviceRegistry​(java.lang.String registryId,
                                            org.wso2.msf4j.MicroservicesRegistry microservicesRegistry)
        Add MicroservicesRegistry with the given registry Id.
        Parameters:
        registryId - id of the registry.
        microservicesRegistry - instance.
      • getMicroserviceRegistries

        public java.util.Map<java.lang.String,​org.wso2.msf4j.MicroservicesRegistry> getMicroserviceRegistries()
        Get all the MicroservicesRegistries
        Returns:
        Map of MicroservicesRegistries and there IDs