Interface ITextScannable


public interface ITextScannable
This interface provides a access to a text resource that can be repeatedly updated and scanned for text. Examples with be a running batch job, docker container log or a linux server log. It is the intention that other Managers will provide IScannable objects for use within the Text Scan Manager
  • Method Details

    • isScannableInputStream

      boolean isScannableInputStream()
      Is the scannable object fetched by inputstream, used when the text file can be so large that it may exceed the JVM heap.
      Returns:
      true if is an inputstream
    • isScannableString

      boolean isScannableString()
      Used for normal logs that fit easily in a standard String
      Returns:
      true if it is a simple String object
    • getScannableName

      String getScannableName()
      A name so the this scannable can be identified in exceptions or warning messages
      Returns:
      a string to uniquely identify the scannable
    • updateScannable

      ITextScannable updateScannable() throws TextScanException
      Update/Refresh the scannable text, likely to be a no-op if this is an inputstream scannable.
      Returns:
      this scannable for fluent use
      Throws:
      TextScanException - If the update fails
    • getScannableInputStream

      InputStream getScannableInputStream() throws TextScanException
      Fetch the InputStream for the scannable
      Returns:
      The latest inputstream
      Throws:
      TextScanException - If there is an error fetching the inputstream or it is not an inputstream
    • getScannableString

      String getScannableString() throws TextScanException
      Fetch the latest scannable text
      Returns:
      The latest scannable text
      Throws:
      TextScanException - if there is an error retrieving the text