DaytonaSandboxState
public class DaytonaSandboxState extends SandboxState
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:21–70Daytona 沙箱状态,在隔离环境中安全执行代码和工具。位于 io.agentscope.extensions.sandbox.daytona 包,继承自 SandboxState。核心成员包括 getSandboxId、setSandboxId、getWorkspaceRoot、setWorkspaceRoot、isSandboxOwned、setSandboxOwned。
Serializable state for a Daytona-backed sandbox.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
DEFAULT_WORKSPACE_ROOTstaticfinal | String | 默认工作区根字段。 The DEFAULT WORKSPACE ROOT field. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getSandboxId() | 获取沙箱标识。 Returns the sandbox id. |
public void setSandboxId(String sandboxId) | 设置沙箱标识。 Sets the sandbox id. |
public String getWorkspaceRoot() | 获取工作区根。 Returns the workspace root. |
public void setWorkspaceRoot(String workspaceRoot) | 设置工作区根。 Sets the workspace root. |
public boolean isSandboxOwned() | 判断是否 `isSandboxOwned`。 Returns whether the sandbox owned. |
public void setSandboxOwned(boolean sandboxOwned) | 设置 `setSandboxOwned`。 Sets the sandbox owned. |
public String getImage() | 获取图像。 Returns the image. |
public void setImage(String image) | 设置图像。 Sets the image. |
public String getSnapshotId() | 获取快照标识。 Returns the snapshot id. |
public void setSnapshotId(String snapshotId) | 设置快照标识。 Sets the snapshot id. |
字段详情Field Detail
DEFAULT_WORKSPACE_ROOT
public static final String DEFAULT_WORKSPACE_ROOT
staticfinal
默认工作区根字段。声明为 public static final String DEFAULT_WORKSPACE_ROOT。
The DEFAULT WORKSPACE ROOT field.
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:23方法详情Method Detail
getSandboxId
public String getSandboxId()
获取沙箱标识。
Returns the sandbox id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:31–33setSandboxId
public void setSandboxId(String sandboxId)
设置沙箱标识。
Sets the sandbox id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxId | String | 沙箱标识(类型 `String`)。The sandbox id. |
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:35–37getWorkspaceRoot
public String getWorkspaceRoot()
获取工作区根。
Returns the workspace root.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:39–41setWorkspaceRoot
public void setWorkspaceRoot(String workspaceRoot)
设置工作区根。
Sets the workspace root.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspaceRoot | String | 工作区根(类型 `String`)。The workspace root. |
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:43–45isSandboxOwned
public boolean isSandboxOwned()
判断是否 isSandboxOwned。
Returns whether the sandbox owned.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:47–49setSandboxOwned
public void setSandboxOwned(boolean sandboxOwned)
设置 setSandboxOwned。
Sets the sandbox owned.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxOwned | boolean | 沙箱 Owned(类型 `boolean`)。The sandbox owned. |
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:51–53getImage
public String getImage()
获取图像。
Returns the image.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:55–57setImage
public void setImage(String image)
设置图像。
Sets the image.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
image | String | 图像(类型 `String`)。The image. |
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:59–61getSnapshotId
public String getSnapshotId()
获取快照标识。
Returns the snapshot id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:63–65setSnapshotId
public void setSnapshotId(String snapshotId)
设置快照标识。
Sets the snapshot id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
snapshotId | String | 快照标识(类型 `String`)。The snapshot id. |
源码Source
io/agentscope/extensions/sandbox/daytona/DaytonaSandboxState.java:67–69