Class ServicesInfo


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

      Constructors 
      Constructor Description
      ServicesInfo​(org.codehaus.jackson.JsonNode root)
      The only constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ServiceInfo forId​(java.lang.String id)
      Return service info for a service with given id
      java.util.Collection<ServiceInfo> forType​(java.lang.String type)
      Return service infos for a bundle with name name
      int getTotalNumOfServices()  
      • Methods inherited from class java.lang.Object

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

      • ServicesInfo

        public ServicesInfo​(org.codehaus.jackson.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​(java.lang.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 java.util.Collection<ServiceInfo> forType​(java.lang.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