Class BasicStatusLine.Unmodifiable

java.lang.Object
org.apache.juneau.http.classic.BasicStatusLine
org.apache.juneau.http.classic.BasicStatusLine.Unmodifiable
All Implemented Interfaces:
StatusLine, UnmodifiableBean
Enclosing class:
BasicStatusLine

public static class BasicStatusLine.Unmodifiable extends BasicStatusLine implements UnmodifiableBean
An unmodifiable point-in-time snapshot of a BasicStatusLine.

Its only behavioral override is modify(Runnable), which throws — because all mutation is funneled through modify(...), this single override freezes the entire mutation surface.

  • Constructor Details

    • Unmodifiable

      protected Unmodifiable(BasicStatusLine copyFrom)
      Constructor.
      Parameters:
      copyFrom - The status line to snapshot. Must not be null.
  • Method Details

    • modify

      protected BasicStatusLine modify(Runnable mutation)
      Description copied from class: BasicStatusLine
      Single mutation funnel — the only choke-point through which all state changes on this bean flow.

      Every mutator routes through this method. The BasicStatusLine.Unmodifiable snapshot overrides only this method to throw, which freezes the entire mutation surface with a single override.

      Overrides:
      modify in class BasicStatusLine
      Parameters:
      mutation - The state change to apply.
      Returns:
      This object.