Class ClosePhase
java.lang.Object
tech.guilhermekaua.spigotboot.inventoryapi.internal.engine.phase.ClosePhase
Session teardown: idempotent on closed sessions, cancels the update task, marks the
session closed, runs
onClose (a throw is logged, teardown always completes),
unregisters the session, drops pending deferred operations and closes a container the
client still shows after an engine-initiated close. Constructed and invoked only by
ViewEngine.-
Constructor Summary
ConstructorsConstructorDescriptionClosePhase(@NotNull ViewEngine engine, @NotNull SessionRegistry sessions) Creates the phase. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(@NotNull ViewSession session, @NotNull CloseReason reason) Closes a session with the given reason; closing an already closed session is a no-op.
-
Constructor Details
-
ClosePhase
Creates the phase.- Parameters:
engine- the owning enginesessions- the per-player session registry
-
-
Method Details
-
close
Closes a session with the given reason; closing an already closed session is a no-op.- Parameters:
session- the session to closereason- the close reason exposed toonClose
-