/** * Gets the metadata of the provider's directory. This may involve connecting to the * server and getting a directory. The result is cached. * * @return {@link Metadata}. May contain no data, but is never {@code null}. */ public Metadata getMetadata() throws AcmeException { readDirectory(); return metadata.get(); }
/** * Gets the metadata of the provider's directory. This may involve connecting to the * server and getting a directory. The result is cached. * * @return {@link Metadata}. May contain no data, but is never {@code null}. */ public Metadata getMetadata() throws AcmeException { readDirectory(); return metadata.get(); }
/** * Gets the {@link URL} of the given {@link Resource}. This may involve connecting to * the server and getting a directory. The result is cached. * * @param resource * {@link Resource} to get the {@link URL} of * @return {@link URL} of the resource * @throws AcmeException * if the server does not offer the {@link Resource} */ public URL resourceUrl(Resource resource) throws AcmeException { readDirectory(); URL result = resourceMap.get().get(Objects.requireNonNull(resource, "resource")); if (result == null) { throw new AcmeException("Server does not offer " + resource.path()); } return result; }
/** * Gets the {@link URL} of the given {@link Resource}. This may involve connecting to * the server and getting a directory. The result is cached. * * @param resource * {@link Resource} to get the {@link URL} of * @return {@link URL} of the resource * @throws AcmeException * if the server does not offer the {@link Resource} */ public URL resourceUrl(Resource resource) throws AcmeException { readDirectory(); URL result = resourceMap.get().get(Objects.requireNonNull(resource, "resource")); if (result == null) { throw new AcmeException("Server does not offer " + resource.path()); } return result; }