Class ServicesInfo


  • public class ServicesInfo
    extends Object
    A simple Wrapper around the returned JSON when requesting the status of /system/console/services
    • Constructor Detail

      • ServicesInfo

        public ServicesInfo​(com.fasterxml.jackson.databind.JsonNode root)
                     throws ClientException
        The only constructor.
        Parameters:
        root - the root JSON node of the bundles info.
        Throws:
        ClientException - if the json does not contain the proper info
    • Method Detail

      • getTotalNumOfServices

        public int getTotalNumOfServices()
        Returns:
        total number of bundles.
      • forId

        public ServiceInfo forId​(String id)
                          throws ClientException
        Return service info for a service with given id
        Parameters:
        id - the id of the service
        Returns:
        the BundleInfo
        Throws:
        ClientException - if the info could not be retrieved
      • forType

        public Collection<ServiceInfo> forType​(String type)
                                        throws ClientException
        Return service infos for a bundle with name name
        Parameters:
        type - the type of the service
        Returns:
        a Collection of ServiceInfos of all services with the given type. Might be empty, never null
        Throws:
        ClientException - if the info cannot be retrieved