Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document cloud-core #9

Merged
merged 30 commits into from
Dec 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d83ef9a
chore: port over the existing docs
Citymonstret Nov 28, 2023
28dad53
provide snippets for maven & gradle
Citymonstret Nov 28, 2023
ae498f9
disable instant :)
Citymonstret Nov 28, 2023
0b484a3
fix the navigation names
Citymonstret Nov 28, 2023
e2b7404
stuff x
Citymonstret Nov 28, 2023
b1011e0
more scaffolding
Citymonstret Nov 28, 2023
5e87fe9
some parser docs
Citymonstret Nov 28, 2023
5100660
Update docs/core/index.md
Citymonstret Nov 28, 2023
5aaa0cf
explain parsing
Citymonstret Nov 29, 2023
bac12a8
Update docs/core/index.md
Citymonstret Nov 29, 2023
92769be
explain execution coordinators & exception handling
Citymonstret Nov 29, 2023
5d64c03
explain processing
Citymonstret Nov 29, 2023
220eb98
some improvements & disable cookie consent form for now
Citymonstret Nov 29, 2023
02feed1
test out social
Citymonstret Nov 29, 2023
2a9cd06
Revert "test out social"
Citymonstret Nov 29, 2023
4755698
document the new exception handling api
Citymonstret Dec 3, 2023
936086b
document the parser registry
Citymonstret Dec 3, 2023
6d2050d
start documenting commands
Citymonstret Dec 3, 2023
d0408b2
document permissions
Citymonstret Dec 3, 2023
411db0a
document sender types
Citymonstret Dec 3, 2023
fc56983
document literals
Citymonstret Dec 3, 2023
0ddc9e9
explain the new caption system
Citymonstret Dec 9, 2023
170fca2
hlep
Citymonstret Dec 10, 2023
20dfed4
we now support spring bby
Citymonstret Dec 17, 2023
cc57b4b
explain how to produce suggestions
Citymonstret Dec 17, 2023
4e275ca
document meta
Citymonstret Dec 21, 2023
b67cdda
disable the nav footer
Citymonstret Dec 21, 2023
b7bcb51
very extensive component documentation
Citymonstret Dec 21, 2023
15c965d
ok docs finished idc anymore bye
Citymonstret Dec 21, 2023
cccfbdb
restore cookie consent modal
Citymonstret Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
explain processing
Citymonstret committed Nov 29, 2023
commit 5d64c030726d66f0250495eb1858419584d00b42
22 changes: 19 additions & 3 deletions docs/core/index.md
Original file line number Diff line number Diff line change
@@ -101,9 +101,25 @@ Cloud ships with two different command execution coordinators:

### Customizing the command manager

#### Pre-processing

#### Post-processing
#### Pre- & Postprocessing

When a command is entered by a command sender, it goes through the following stages:

1. It is converted into a `CommandInput` instance.
2. A command context is created for the input.
3. The context is passed to the preprocessors, which may alter the command input or write to the context.
- If a command processor causes an interrupt using `ConsumerService.interrupt()` the context will be filtered out
and the command will not be parsed.
4. The input is parsed into a command chain, and the parsed values are written to the context.
- If the input cannot be parsed into a command that the sender is allowed to execute, the sender is
notified and the parsing is canceled.
5. The command postprocessors get to act on the command, and may alter the command context.
They may also postpone command execution, which can be used to require confirmations, etc.
- If a postprocessor causes an interrupt using `ConsumerService.interrupt()` the command will not be executed.
6. The command is executed using the command executor.

The pre- and post-processors can be registered to the command manager using `CommandManager#registerCommandPreProcessor`
and `CommandManager#registerCommandPostProcessor`.

#### Exception handling