Class NaruOutput

java.lang.Object
net.thevpc.naru.api.agent.NaruOutput

public class NaruOutput extends Object
One piece of session output, as produced by NaruInteraction.write(net.thevpc.naru.api.agent.NaruLogMode, net.thevpc.nuts.text.NMsg).

Carries a monotonic per-session sequence() so a consumer that reconnects can tell what it missed, and an instant() so a web front end can stamp arrival time rather than guessing. The mode() is preserved so a consumer can filter: a UI showing only AGENT_RESPONSE should not have to parse styled text to find it.

No styling

message() is plain. A terminal implementation renders it, and is the only place that decides on colour and indentation — so a browser or an HTTP client never receives ANSI escapes it would have to strip.
  • Constructor Details

  • Method Details

    • sequence

      public long sequence()
      Monotonic within one session, starting at 1.
    • instant

      public Instant instant()
    • mode

      public NaruLogMode mode()
    • message

      public NMsg message()
    • toString

      public String toString()
      Overrides:
      toString in class Object