Interface StatusLine

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
SplitConsole.DefaultStatusLine

public interface StatusLine extends AutoCloseable
An interface to a status line that can be used by ResourceProviders to indicate progress during the execution of ResourceProviderSpi.provide(ResourceRequest).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final StatusLine
    An implementation that does nothing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deallocate the line for outputs from the current thread.
    void
    update(String text, Object... args)
    Update the text in the status line.
    writer(String prefix)
    Returns a writer to the status line.
  • Field Details

  • Method Details

    • update

      void update(String text, Object... args)
      Update the text in the status line. If argumnts are given, text is interpreted as a format string for []String#format] with the given arguments.
      Parameters:
      text - the text
      args - the arguments
    • writer

      Returns a writer to the status line. This writer can be used to append text to the status line. Closing the writer will not close the status line.

      If a prefix is given, it will be printed at the beginning of the status line.

      Parameters:
      prefix - the prefix
      Returns:
      the prints the writer
    • close

      void close()
      Deallocate the line for outputs from the current thread.
      Specified by:
      close in interface AutoCloseable