блочно > Соединение > getShadowState
Метод Connection.getShadowState()
Возвращает сериализованное объектное представление теневого блока соединения.
Подпись:
getShadowState(returnCurrent?: boolean): blocks.State | null;
Параметры
Параметр | Тип | Описание |
---|
returnCurrent | логическое значение | (Необязательно) Если true и теневой блок в настоящее время подключен к этому соединению, это сериализует состояние этого блока и возвращает его (чтобы значения полей были правильными). В противном случае просто возвращается сохраненное состояние. |
Возврат:
блоки.Состояние | нулевой
Сериализованное объектное представление блока или значение NULL.
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-01-05 UTC.
[null,null,["Последнее обновление: 2025-01-05 UTC."],[[["`Connection.getShadowState()` returns a serialized representation of the connection's shadow block, which can be used to recreate the block."],["The method accepts an optional boolean parameter `returnCurrent` that, if true, serializes the current state of the attached shadow block, including field values."],["If `returnCurrent` is false or there's no attached shadow block, the method returns the previously saved state of the shadow block."],["The returned value is of type `blocks.State` or null if there's no serialized shadow block data."]]],["The `getShadowState` method retrieves the serialized representation of a connection's shadow block. It accepts an optional `returnCurrent` boolean parameter. If `returnCurrent` is true and a shadow block is attached, the method returns the current state of that block, including field values. Otherwise, it returns the saved state. The method outputs either a serialized object representation of the block (`blocks.State`) or `null` if no shadow block is associated.\n"]]