Package cc.maria.rdap

Class RDAPClient


  • public class RDAPClient
    extends Object
    • Field Detail

      • serviceURL

        private String serviceURL
      • client

        private final jakarta.ws.rs.client.Client client
    • Constructor Detail

      • RDAPClient

        public RDAPClient()
      • RDAPClient

        public RDAPClient​(String serviceURL)
      • RDAPClient

        public RDAPClient​(jakarta.ws.rs.client.Client client)
      • RDAPClient

        public RDAPClient​(String serviceURL,
                          jakarta.ws.rs.client.Client client)
    • Method Detail

      • setServiceURL

        private void setServiceURL​(String serviceURL)
      • getServiceURL

        public String getServiceURL​(String object)
        Get the service URL for a given object. If the service URL is not set, the service URL will be looked up from the bootstrap registry. NOTE: RDAP servers can further redirect the client to another service URL. This method returns the first responsible service URL. TODO: Fix
        Parameters:
        object - The object to be looked up
        Returns:
        The service URL responsible for the object
      • query

        public ObjectClass query​(ObjectReference objectReference)
                          throws RDAPException,
                                 com.fasterxml.jackson.core.JsonProcessingException
        Query the responsible RDAP service for a specified object
        Parameters:
        objectReference - The object to query for
        Returns:
        The object class returned by the server
        Throws:
        RDAPException - Error in the RDAP protocol
        com.fasterxml.jackson.core.JsonProcessingException - Error in JSON parsing
      • getServiceURL

        public String getServiceURL()
        Get custom service URL set during initialization
        Returns:
        Service URL override
      • getClient

        public jakarta.ws.rs.client.Client getClient()