Package cc.maria.rdap
Class RDAPClient
- java.lang.Object
-
- cc.maria.rdap.RDAPClient
-
public class RDAPClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private jakarta.ws.rs.client.Clientclientprivate StringserviceURL
-
Constructor Summary
Constructors Constructor Description RDAPClient()RDAPClient(jakarta.ws.rs.client.Client client)RDAPClient(String serviceURL)RDAPClient(String serviceURL, jakarta.ws.rs.client.Client client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.ws.rs.client.ClientgetClient()StringgetServiceURL()Get custom service URL set during initializationStringgetServiceURL(String object)Get the service URL for a given object.ObjectClassquery(ObjectReference objectReference)Query the responsible RDAP service for a specified objectAutnumObjectClassqueryAutnum(ObjectReference objectReference)DomainObjectClassqueryDomain(ObjectReference objectReference)EntityObjectClassqueryEntity(ObjectReference objectReference)IPNetworkObjectClassqueryIPNetwork(ObjectReference objectReference)private voidsetServiceURL(String serviceURL)
-
-
-
Field Detail
-
serviceURL
private String serviceURL
-
client
private final 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 protocolcom.fasterxml.jackson.core.JsonProcessingException- Error in JSON parsing
-
queryAutnum
public AutnumObjectClass queryAutnum(ObjectReference objectReference) throws RDAPException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
RDAPExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
queryDomain
public DomainObjectClass queryDomain(ObjectReference objectReference) throws RDAPException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
RDAPExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
queryEntity
public EntityObjectClass queryEntity(ObjectReference objectReference) throws RDAPException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
RDAPExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
queryIPNetwork
public IPNetworkObjectClass queryIPNetwork(ObjectReference objectReference) throws RDAPException, com.fasterxml.jackson.core.JsonProcessingException
- Throws:
RDAPExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
getServiceURL
public String getServiceURL()
Get custom service URL set during initialization- Returns:
- Service URL override
-
getClient
public jakarta.ws.rs.client.Client getClient()
-
-