Class HostScreenSnapshot
java.lang.Object
com.iizix.term.HostScreenSnapshot
An immutable, consistent copy of a host session's screen mirror: characters, attributes, size, cursor position, field model and the screen generation, all captured in one hold of the session monitor by
HostSession.snapshot() - see that method's Javadoc for the full contract (MCP/out-of-process infrastructure; consistent is NOT settled). All arrays are the holder's own copies, never aliases of live state; the snapshot silently becomes stale as the session moves on, never invalid and never torn.- Author:
- Christopher Mindus
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn immutable copy of one host field's value data (seeHostFieldfor the meaning of each member;nextFieldis not carried - the enclosing array is in screen order).Field Summary
FieldsModifier and TypeFieldDescriptionfinal int[]The screen attributes, row by row,width*heightlong: CGA color in the low byte, HostScreen.ATTR_* flags above it.final char[]The screen characters, row by row,width*heightlong.final intThe cursor X position (column, 0-based).final intThe cursor Y position (row, 0-based).final HostScreenSnapshot.HostFieldInfo[]The field model at snapshot time, in screen order.final longThe screen generation at snapshot time.final intThe screen height in characters.final intThe screen width in characters.Method Summary
Field Details
width
public final int widthThe screen width in characters.height
public final int heightThe screen height in characters.chars
public final char[] charsThe screen characters, row by row,width*heightlong. The mirror's convention: field attribute positions and null characters hold'\0'.attrs
public final int[] attrsThe screen attributes, row by row,width*heightlong: CGA color in the low byte, HostScreen.ATTR_* flags above it.cursorX
public final int cursorXThe cursor X position (column, 0-based).cursorY
public final int cursorYThe cursor Y position (row, 0-based).fields
The field model at snapshot time, in screen order. Empty when the screen is unformatted (or the session is disconnected - the mirror's field model is cleared on disconnect).generation
public final long generationThe screen generation at snapshot time. Equal to a laterHostSession.getScreenGeneration()read = nothing captured here has changed since.