Skip to content

Commit ecb8d9f

Browse files
committed
feat(acp): add observable lifecycle state
1 parent affba9f commit ecb8d9f

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright (c) 2018-present, easy-4-java (https://github.com/easy-4-java).
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package io.github.easy4j.kimi.acp;
17+
18+
/**
19+
* Observable lifecycle states of a {@link KimiAcpClient}.
20+
*
21+
* @since 1.0.0
22+
*/
23+
public enum KimiAcpState {
24+
25+
/** Client exists but does not own an ACP transport yet. */
26+
NEW,
27+
28+
/** The child process is being created. */
29+
CONNECTING,
30+
31+
/** The child process exists and the ACP initialize handshake is pending. */
32+
INITIALIZING,
33+
34+
/** ACP initialize completed successfully and requests may be submitted. */
35+
READY,
36+
37+
/** A terminal transport/protocol failure made the connection unusable. */
38+
FAILED,
39+
40+
/** Close has started and new work is rejected. */
41+
CLOSING,
42+
43+
/** All owned resources have been released. */
44+
CLOSED
45+
}

0 commit comments

Comments
 (0)