S8SyncFlow
com.s8.meta.api.flow
interface
The main orchestration flow of the S8 stack. A flow lives for one request or one script. Fresh flows are provided continuously by the system.
Do not reuse, store, or cache a flow.
Anything other than live use during the current request or script is unsupported.
Flows always run inside virtual threads. Write plain Java; it will run safely at high performance.
Constants
- CREATE_SPACE_IF_NOT_PRESENT
- static final long · Bool64.BIT02
- SAVE_IMMEDIATELY_AFTER
- static final long · Bool64.BIT03
- SHOULD_NOT_OVERRIDE
- static final long · Bool64.BIT04
- HEAD_VERSION
- HEAD tag for a repository. static final long HEAD_VERSION = -0x62L
Identity
- getMe()
- Return the flow owner. S8User getMe()
- setMe(user)
- Define the flow owner. void setMe(S8User user)
- getMySpaceId()
- Personal space id of the current user, or
null. default String getMySpaceId()
Gateways
- front()
- Web front when present. S8FrontSession front()
- tables()
- Flash persistency. TablesDB tables()
- spaces()
- Object-graph spaces. SpacesDB spaces()
- repositories()
- Git-like object repositories. RepositoriesDB repositories()
- mail()
- Mail manager. MailManager mail() throws S8FlowException
- delegate()
- Offload heavy work (profiles FX0–FX7, IO, WEB). DelegatedRunner delegate()
I/O on the flow
- sendResponse(request)
- Send an external response. void sendResponse(SendExtResponseS8Request) throws S8FlowException
- deliver(load, generator)
- Deliver a generated web resource. void deliver(int load, S8WebResourceGenerator) throws S8FlowException
- refresh()
- Push the current front delta to the browser. Call after mutating outbound fields. Inbound lambdas call it for you. void refresh() throws S8FlowException
Example
@Override
public void boot(S8SyncFlow flow) throws Exception {
flow.setMe(currentUser);
HomeScreen screen = new HomeScreen(flow.front());
screen.vertex.expose(0);
flow.refresh();
}
Intent If a feature of the stack exists, it is reached from the flow — not from a second client library.