Skip to content

Commit b62ea62

Browse files
committed
docs: add comprehensive OpenClaw Javadocs
1 parent 5db77d6 commit b62ea62

141 files changed

Lines changed: 10223 additions & 4263 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
package io.github.easy4j.openclaw;
22

33
/**
4-
* 将调用方取消信号绑定到底层 HTTP Call。
4+
* HTTP 取消信号接口。实现方注册 Call.cancel 回调,并返回请求结束时用于注销该回调的句柄。
5+
*
6+
* @author <a href="https://github.com/loong10k">Loong Wan</a>
7+
* @since 1.0.0
58
*/
69
@FunctionalInterface
710
public interface HttpCallCancellation {
811

912
/**
10-
* 注册取消动作。
13+
* 接收并处理 Cancel 生命周期事件;实现不会改变事件顺序。
1114
*
12-
* @param callback 取消时执行的动作
13-
* @return 请求结束后用于注销动作的句柄
15+
* @param callback 取消或事件回调
16+
* @return 请求终止后用于注销取消回调的句柄
1417
*/
1518
AutoCloseable onCancel(Runnable callback);
1619
}
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
package io.github.easy4j.openclaw;
22

33
/**
4-
* HTTP 对话响应模式。
4+
* HTTP 响应消费模式,区分一次性读取完整响应、持续消费流以及由客户端按端点自动选择。
5+
*
6+
* @author <a href="https://github.com/loong10k">Loong Wan</a>
7+
* @since 1.0.0
58
*/
69
public enum HttpResponseMode {
710

8-
/** 等待完整响应后一次性返回。 */
11+
/**
12+
* 选择 `blocking` 协议模式;序列化时使用该固定取值。
13+
*/
914
BLOCKING,
1015

11-
/** 消费 Provider SSE 并逐段回调。 */
16+
/**
17+
* 选择 `stream` 协议模式;序列化时使用该固定取值。
18+
*/
1219
STREAM,
1320

14-
/** 由调用方根据结构化输出、工具调用等请求特征选择。 */
21+
/**
22+
* 选择 `auto` 协议模式;序列化时使用该固定取值。
23+
*/
1524
AUTO
1625
}

‎src/main/java/io/github/easy4j/openclaw/OpenClawCliConfig.java‎

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,51 @@
33
import lombok.Data;
44

55
/**
6-
* OpenClaw local CLI client configuration.
7-
* <p>
8-
* Covers {@code openclaw} executable,timeout,concurrency,working directory CLI .
9-
* </p>
6+
* 本地 CLI 通道配置,定义可执行文件、工作目录、启动探测、命令超时和最大并发子进程数。
107
*
11-
* @author [@Loong Wan](https://github.com/loong10k)
8+
* @author <a href="https://github.com/loong10k">Loong Wan</a>
129
* @since 1.0.0
1310
*/
1411
@Data
1512
public class OpenClawCliConfig {
1613

1714
/**
18-
* Whether to enable CLI system.
19-
* <p>When false,skips CLI .</p>
15+
* 是否创建并开放对应通信通道;关闭后门面不会初始化该子系统。
2016
*/
2117
private boolean enabled = true;
2218

2319
/**
24-
* At startupWhether to probe {@code openclaw --version}.
20+
* 是否在客户端构造阶段执行可用性探测;默认关闭以避免启动阻塞。
2521
*/
2622
private boolean startupCheckEnabled = false;
2723

2824
/**
29-
* CLI Whether to fail fast(interrupts construction).
30-
* <p>Defaults to false only logs a warning;productionwhen true.</p>
25+
* 启动探测失败时是否中断客户端构造;关闭时仅记录警告。
3126
*/
3227
private boolean failFastOnUnavailable = false;
3328

3429
/**
35-
* executable name
30+
* 本地 openclaw 可执行文件名或绝对路径。
3631
*/
3732
private String executable = "openclaw";
3833

3934
/**
40-
* agent timeout(seconds)
35+
* 单次 CLI 命令默认超时,单位为秒。
4136
*/
4237
private int timeout = 300;
4338

4439
/**
45-
* CLI subprocessworking directory;When empty, JVM directory.
40+
* CLI 子进程工作目录;为空时继承当前 JVM 工作目录。
4641
*/
4742
private String workingDirectory;
4843

4944
/**
50-
* CLI subprocessmaximum concurrency; 0 CPU 2 value.
45+
* 允许同时运行的 CLI 子进程数;非正数使用按 CPU 核心数计算的默认值。
5146
*/
5247
private int maxConcurrentExecutions = 0;
5348

5449
/**
55-
* timeout(seconds)
50+
* 执行 openclaw --version 启动探测的超时,单位为秒。
5651
*/
5752
private int probeTimeoutSeconds = 5;
5853

0 commit comments

Comments
 (0)