Class Locked.Unmodifiable

All Implemented Interfaces:
Serializable, HttpResponseMessage, UnmodifiableBean
Enclosing class:
Locked

public static class Locked.Unmodifiable extends Locked implements UnmodifiableBean
Unmodifiable point-in-time snapshot of the enclosing Locked exception.

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

See Also:
  • Constructor Details

    • Unmodifiable

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

    • modify

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

      Every fluent setter routes through this method. The nested Unmodifiable snapshot overrides only this method to throw, which freezes the entire mutation surface with a single override. Because this is a Throwable-rooted hierarchy (no CRTP self-type), the funnel returns the base type.

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