Class Client

java.lang.Object
io.crums.client.Client

public class Client
extends java.lang.Object
  • Field Details

  • Constructor Details

    • Client

      public Client()
  • Method Details

    • getHash

      public java.lang.String getHash()
      Returns:
      the hash
    • setHash

      public Client setHash​(java.lang.String hash)
      Parameters:
      hash - the hash to set (in hex)
    • setHash

      public Client setHash​(byte[] hash)
    • setHash

      public Client setHash​(java.nio.ByteBuffer hash)
    • addHash

      public Client addHash​(java.lang.String hash)
      Parameters:
      hash - the hash to set (in hex)
    • addHash

      public Client addHash​(byte[] hash)
    • addHash

      public Client addHash​(java.nio.ByteBuffer hash)
    • clearHashes

      public Client clearHashes()
    • getHashes

      public java.util.List<java.lang.String> getHashes()
    • getCrumRecords

      public java.util.List<CrumRecord> getCrumRecords()
      Returns the CrumRecords for the
      Returns:
      non-empty, immutable list of records
    • getCrumRecordsAsJson

      public java.lang.Object getCrumRecordsAsJson() throws ClientException
      Returns the server response as a json object.
      Returns:
      either a JSONObject or JSONArray
      Throws:
      ClientException
    • getBeacon

      public TreeRef getBeacon() throws ClientException
      Throws:
      ClientException
    • main

      public static void main​(java.lang.String[] args) throws java.lang.Exception
      Throws:
      java.lang.Exception