Interface MetaReader

All Known Subinterfaces:
MetaStore
All Known Implementing Classes:
FileSystemTufStore, PassthroughCacheMetaStore

public interface MetaReader
Interface that defines reading meta from local storage.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends SignedTufMeta<? extends TufMeta>>
    Optional<T>
    readMeta(String roleName, Class<T> tClass)
    Return a named metadata item if there is any.
  • Method Details

    • readMeta

      <T extends SignedTufMeta<? extends TufMeta>> Optional<T> readMeta(String roleName, Class<T> tClass) throws IOException, JsonParseException
      Return a named metadata item if there is any.
      Parameters:
      roleName - the name of the role to load (root, timestamp, snapshot, targets, or a delegated target role)
      tClass - the class type
      Returns:
      an instance of the signed metadata for the role if it was found
      Throws:
      IOException - if an error occurs reading from the backing store
      JsonParseException