Package web-server-technology
demo-web-server-technology #sleela 2.5 (lib/web-server-technology/demo-web-server-technology.sleela)
DemoWebServerTechnology class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
SLDualStackBinding #sleela 2.5 (lib/web-server-technology/SLDualStackBinding.sleela)
SLDualStackBinding class
Defines the SLeeLa standard-library type SLDualStackBinding, the SLeeLa-side model of the native listener binding that accepts the full range of world IP addresses over IPv6 with IPv4-mapped fallback.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
address | String address | ---- Binding descriptor ---- Explicit bind address literal; empty means all interfaces. |
port | int port | TCP port. |
dualStack | boolean dualStack | True when one AF_INET6 socket also accepts IPv4-mapped peers. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int listenPort) | No description in source. |
bindTo | void bindTo(String literal) | No description in source. |
getAddress | String getAddress() | No description in source. |
getPort | int getPort() | No description in source. |
isDualStack | boolean isDualStack() | No description in source. |
reachesWorld | boolean reachesWorld() | Whether this binding reaches the full range of world IP addresses: true only when bound to all interfaces as dual-stack. |
serviceName | String serviceName() | No description in source. |
SLEnvelopment #sleela 2.5 (lib/web-server-technology/SLEnvelopment.sleela)
SLEnvelopment class
Defines the SLeeLa standard-library type SLEnvelopment, the SLeeLa-side model of Side 2: a domain that fronts many disparate programs via warrants, gated to Scientists. Native counterpart: web-server-technology/native/envelopment.cpp.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
enabled | boolean enabled | ---- Envelopment state (mirrors struct Envelopment in envelopment.h) ---- Master switch; Side 2 is off (Side 1 only) unless this is true. |
scientist | boolean scientist | Capability gate; envelopment requires a Scientist. |
domain | String domain | The domain this envelopment fronts. |
programCount | int programCount | Count of declared programs and warrants (the native side owns the lists). |
warrantCount | int warrantCount | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String domainName) | No description in source. |
getDomain | String getDomain() | No description in source. |
turnOn | void turnOn() | Turn Side 2 on. Does not by itself activate; see active(). Named turnOn() rather than enable() because enable is a reserved Munction builtin. |
turnOff | void turnOff() | No description in source. |
grantScientist | void grantScientist() | Assert the Scientist capability that gates Side 2. |
hasScientist | boolean hasScientist() | No description in source. |
registerProgram | void registerProgram() | The native loader populates these as it parses the config. The SLeeLa model tracks the counts so active() can enforce the "at least one warrant" rule. |
registerWarrant | void registerWarrant() | No description in source. |
getProgramCount | int getProgramCount() | No description in source. |
getWarrantCount | int getWarrantCount() | No description in source. |
active | boolean active() | Side 2 is usable only with BOTH gates set and at least one warrant. This is the exact rule enforced natively by Envelopment::active(). |
serviceName | String serviceName() | No description in source. |
SLPackage #sleela 2.5 (lib/web-server-technology/SLPackage.sleela)
SLPackage class
Defines the SLeeLa standard-library package for web-server-technology, the dynamic SQL-backed web server family.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
packageName | String packageName | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name) | No description in source. |
name | String name() | No description in source. |
available | boolean available() | No description in source. |
SLSqlEndpoint #sleela 2.5 (lib/web-server-technology/SLSqlEndpoint.sleela)
SLSqlEndpoint class
Defines the SLeeLa standard-library type SLSqlEndpoint, the SLeeLa-side model of the dynamic /db route that executes SQL against the CSV-backed SLeeLa SQL engine and returns JSON.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
routePrefix | String routePrefix | ---- Endpoint policy (mirrors db_endpoint in the native server) ---- Route prefix served by this endpoint. |
writable | boolean writable | When true, mutating statements are permitted; otherwise read-only. |
maxStatementBytes | int maxStatementBytes | Maximum SQL text length accepted, in bytes. Native bound is 8192. |
maxRows | int maxRows | Maximum rows serialized into a single JSON response. Native bound is 10000. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String prefix) | No description in source. |
getRoutePrefix | String getRoutePrefix() | No description in source. |
allowWrites | void allowWrites() | No description in source. |
writesAllowed | boolean writesAllowed() | No description in source. |
setMaxStatementBytes | void setMaxStatementBytes(int n) | No description in source. |
getMaxStatementBytes | int getMaxStatementBytes() | No description in source. |
setMaxRows | void setMaxRows(int n) | No description in source. |
getMaxRows | int getMaxRows() | No description in source. |
isReadOnlyVerb | boolean isReadOnlyVerb(String verb) | Classify whether a leading keyword is a read-only verb. Mirrors the native statement_is_readonly policy: SELECT, SHOW, and the fluent from()/tables() forms are reads; everything else is a mutation. |
permits | boolean permits(String verb) | Decide whether a statement with the given leading verb is permitted under the current policy. |
serviceName | String serviceName() | No description in source. |
SLWarrant #sleela 2.5 (lib/web-server-technology/SLWarrant.sleela)
SLWarrant class
Defines the SLeeLa standard-library type SLWarrant, the SLeeLa-side model of an envelopment warrant: a cause served for a subject by a named program.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
cause | String cause | ---- Warrant descriptor (mirrors struct Warrant in envelopment.h) ---- The reason-to-serve, recorded for provenance and logged on each match. |
subject | String subject | Host to match; "*" matches any host. |
pathPrefix | String pathPrefix | Optional additional path gate; empty matches any path. |
program | String program | Name of the program this warrant activates. |
enabled | boolean enabled | A disabled warrant never matches. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String causeText) | No description in source. |
getCause | String getCause() | No description in source. |
setSubject | void setSubject(String host) | No description in source. |
getSubject | String getSubject() | No description in source. |
setPathPrefix | void setPathPrefix(String prefix) | No description in source. |
getPathPrefix | String getPathPrefix() | No description in source. |
bindProgram | void bindProgram(String programName) | No description in source. |
getProgram | String getProgram() | No description in source. |
disable | void disable() | No description in source. |
isEnabled | boolean isEnabled() | No description in source. |
matchesHost | boolean matchesHost(String host) | Whether this warrant matches a request for the given host. Path-prefix matching is performed natively; this models the host/enabled gate. |
serviceName | String serviceName() | No description in source. |
SLWebProgram #sleela 2.5 (lib/web-server-technology/SLWebProgram.sleela)
SLWebProgram class
Defines the SLeeLa standard-library type SLWebProgram, the SLeeLa-side model of a mounted program in a Side-2 envelopment: a named unit of behaviour whose backing kind is static, sql, or meme. Named SLWebProgram (not SLProgram) to avoid colliding with the existing lib/cpu/SLProgram.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
programName | String programName | ---- Program descriptor (mirrors struct Program in envelopment.h) ---- Unique program name within its envelopment. |
kind | String kind | Backing kind: "static", "sql", or "meme". |
mount | String mount | Path prefix this program owns under the domain, e.g. "/papers". |
root | String root | static: document-root subtree. |
databaseDirectory | String databaseDirectory | sql: directory of CSV tables. |
databaseWritable | boolean databaseWritable | sql: whether mutations are permitted. |
memeBody | String memeBody | meme: fixed response body. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name) | No description in source. |
getProgramName | String getProgramName() | No description in source. |
setMount | void setMount(String m) | No description in source. |
getMount | String getMount() | No description in source. |
asStatic | void asStatic(String documentRoot) | Shape this program as a static-file surface. |
asSql | void asSql(String tableDirectory) | Shape this program as a SQL surface over a table directory. |
asMeme | void asMeme(String body) | Shape this program as a single fixed meme response. |
allowDatabaseWrites | void allowDatabaseWrites() | No description in source. |
getKind | String getKind() | No description in source. |
isStatic | boolean isStatic() | No description in source. |
isSql | boolean isSql() | No description in source. |
isMeme | boolean isMeme() | No description in source. |
serviceName | String serviceName() | No description in source. |
SLWebServer #sleela 2.5 (lib/web-server-technology/SLWebServer.sleela)
SLWebServer class
Defines the SLeeLa standard-library type SLWebServer, the SLeeLa-side model of the dynamic SQL-backed HTTP/1.1 web server whose native implementation lives at web-server-technology/native/dyn_sql_server.cpp.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
root | String root | ---- Server configuration (mirrors the native command-line contract) ---- Document root for static files. |
port | int port | TCP port the listener binds. Native default is 8090. |
threads | int threads | Worker-thread count. Native default is 16, maximum 256. |
bindAddress | String bindAddress | Bind address; empty means all interfaces as dual-stack IPv6 plus IPv4. |
databaseDirectory | String databaseDirectory | Directory of CSV tables for the dynamic /db endpoint; empty disables it. |
databaseWritable | boolean databaseWritable | When false the /db endpoint rejects mutating statements. |
state | int state | Lifecycle state: 0 configured/stopped, 1 running. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String documentRoot) | No description in source. |
setPort | void setPort(int p) | No description in source. |
getPort | int getPort() | No description in source. |
setThreads | void setThreads(int n) | No description in source. |
getThreads | int getThreads() | No description in source. |
setBindAddress | void setBindAddress(String a) | No description in source. |
getBindAddress | String getBindAddress() | No description in source. |
enableDatabase | void enableDatabase(String tableDirectory) | Enable the dynamic SQL endpoint against a directory of CSV tables. |
allowDatabaseWrites | void allowDatabaseWrites() | Permit mutating SQL on the /db endpoint. Default policy is read-only. |
databaseEnabled | boolean databaseEnabled() | No description in source. |
writesAllowed | boolean writesAllowed() | No description in source. |
open | void open() | Transition to the running state. The native listener performs the actual bind, dual-stack setup, and request service. |
shutdownServer | void shutdownServer() | Graceful stop. Named shutdownServer() rather than close() because close is a reserved Munction reach-handle builtin in the SLeeLa runtime. |
active | boolean active() | No description in source. |
serviceName | String serviceName() | No description in source. |