Class InfrastrctureServiceClient


  • public class InfrastrctureServiceClient
    extends Object
    Utility class to query EndPoints and search for AccessPoints from IS
    Author:
    Alfredo Oliviero (ISTI - CNR)
    • Constructor Detail

      • InfrastrctureServiceClient

        public InfrastrctureServiceClient()
    • Method Detail

      • getEndopintsFromIS

        public static List<org.gcube.common.resources.gcore.ServiceEndpoint> getEndopintsFromIS​(String resource_name,
                                                                                                String category,
                                                                                                boolean root_service,
                                                                                                org.gcube.common.security.secrets.Secret secret)
        obatins from IS the list of ServiceEndpoint matching the parameters
        Parameters:
        resource_name -
        category -
        root_service -
        secret -
        Returns:
        the list of EndPoints matching the parameters
        Throws:
        Exception
      • getAccessPointsFromIS

        public static List<org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint> getAccessPointsFromIS​(String resource_name,
                                                                                                               String category,
                                                                                                               String endPointName,
                                                                                                               boolean is_root_service,
                                                                                                               org.gcube.common.security.secrets.Secret secret)
        obatains the list of AccessPoints matching the parameters
        Parameters:
        resource_name -
        category -
        endPointName -
        is_root_service -
        Returns:
        the list of AccessPoints
        Throws:
        Exception
      • getFirstAccessPointFromIS

        public static org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint getFirstAccessPointFromIS​(String resource_name,
                                                                                                             String category,
                                                                                                             String entryPointName,
                                                                                                             boolean root_service,
                                                                                                             org.gcube.common.security.secrets.Secret secret)
        obatains the list of AccessPoints matching the parameters, and returns the first one
        Parameters:
        resource_name -
        category -
        entryPointName -
        Returns:
        an AccessPoints matching the parameters
        Throws:
        Exception
      • serviceConfigFromIS

        public static IsServerConfig serviceConfigFromIS​(String resourceName,
                                                         String category,
                                                         String endPointName,
                                                         boolean is_root_service,
                                                         org.gcube.common.security.secrets.Secret secret)
                                                  throws jakarta.ws.rs.NotFoundException,
                                                         ServerException
        Reads the service configuration from the IS
        Parameters:
        resourceName -
        category -
        endPointName -
        is_root_service -
        secret -
        Returns:
        Throws:
        Exception
        jakarta.ws.rs.NotFoundException
        ServerException