Package cc.maria.rdap.bootstrap
Class ASNBootstrapRegistry
- java.lang.Object
-
- cc.maria.rdap.bootstrap.ASNBootstrapRegistry
-
public class ASNBootstrapRegistry extends Object
RFC 9224-compliant wrapper around the IANA RDAP Bootstrap Service Registry for ASN allocations
-
-
Field Summary
Fields Modifier and Type Field Description private HashMap<String,String>asnRangeToServiceMapprivate static HashMap<jakarta.ws.rs.client.Client,ASNBootstrapRegistry>instances
-
Constructor Summary
Constructors Modifier Constructor Description privateASNBootstrapRegistry(jakarta.ws.rs.client.Client client)privateASNBootstrapRegistry(jakarta.ws.rs.client.Client client, String url)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ASNBootstrapRegistrygetInstance(jakarta.ws.rs.client.Client client)Get current instance of the wrapperStringgetServiceURLForASN(Integer asn)Get the RDAP service URL for a given ASNStringgetServiceURLForASN(String asn)Get the RDAP service URL for a given ASNstatic ASNBootstrapRegistryrefresh(jakarta.ws.rs.client.Client client)Throw away the current instance and get a new one with updated bootstrap data
-
-
-
Field Detail
-
instances
private static HashMap<jakarta.ws.rs.client.Client,ASNBootstrapRegistry> instances
-
-
Constructor Detail
-
ASNBootstrapRegistry
private ASNBootstrapRegistry(jakarta.ws.rs.client.Client client) throws IOException- Throws:
IOException
-
ASNBootstrapRegistry
private ASNBootstrapRegistry(jakarta.ws.rs.client.Client client, String url)
-
-
Method Detail
-
getInstance
public static ASNBootstrapRegistry getInstance(jakarta.ws.rs.client.Client client)
Get current instance of the wrapper- Parameters:
client- HTTP client for fetching bootstrap data- Returns:
- ASNBootstrapRegistry instance
-
refresh
public static ASNBootstrapRegistry refresh(jakarta.ws.rs.client.Client client)
Throw away the current instance and get a new one with updated bootstrap data- Parameters:
client- HTTP client for fetching bootstrap data- Returns:
- ASNBootstrapRegistry instance
-
getServiceURLForASN
public String getServiceURLForASN(String asn)
Get the RDAP service URL for a given ASN- Parameters:
asn- ASN to look up- Returns:
- RDAP service URL
-
-