APIServerWorker class final
- Inheritance
-
- Object
- APIServerConfig
- APIServerWorker
Constructors
- APIServerWorker(int workerIndex, APIRoot apiRoot, {required String? name, required String? version, String? address, int? port, int? securePort, Object? domains, Object? letsEncryptDirectory, bool letsEncrypt = false, bool? letsEncryptProduction, bool? allowRequestLetsEncryptCertificate, bool hotReload = false, int? totalWorkers = 1, bool cookieless = false, bool? useSessionID, String? apiCacheControl, String? staticFilesCacheControl, bool? cacheStaticFilesResponses, int? staticFilesCacheMaxMemorySize, int? staticFilesCacheMaxContentLength, Duration? serverResponseDelay, bool? logToConsole, bool? logQueue})
Properties
- address → String
-
The bind address of this server.
finalinherited
- allowRequestLetsEncryptCertificate → bool
-
If
true
allows the request of Let's Encrypt certificates.finalinherited - apiCacheControl → String
-
The
cache-control
header for API responses.finalinherited - apiConfig → APIConfig?
-
The APIConfig of the APIRoot.
finalinherited
- apiInfoURL → String
-
The local
API-INFO
URL of this server.no setterinherited - apiRoot → APIRoot
-
The API root of this server.
finalinherited
- args → ArgsSimple
-
All the parsed arguments, using
ArgsSimple
.finalinherited - cacheStaticFilesResponses → bool
-
If
true
will cache static files. Default: truefinalinherited - canUseLetsEncrypt → bool
-
Returns
true
if the basic conditions for Let's Encrypt are configured.no setterinherited -
If
true
will remove anySet-Cookie
orCookie
header.finalinherited - development → bool
-
finalinherited
-
domains
→ List<
String> -
Returns a list of domains at domainsRoots keys (non RegExp entries).
no setterinherited
-
domainsRoots
→ Map<
Pattern, Directory> -
The domains root directories.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasMultipleWorkers → bool
-
no setter
- hotReload → bool
-
If
true
enables Hot Reload (APIHotReload.enable).finalinherited - id → int
-
ID of this instance.
latefinalinherited
- isAuxiliaryWorker → bool
-
no setter
- isMainWorker → bool
-
no setter
- isStarted → bool
-
Returns
true
if this servers is started.no setterinherited - isStarting → bool
-
Returns
true
if this instance is currently in the process of starting.no setterinherited - isStopped → bool
-
Returns
true
if this server is closed.typeno setterinherited - letsEncrypt → bool
-
If
true
enabled Let's Encrypt.finalinherited - letsEncryptDirectory → Directory?
-
The Let's Encrypt certificates Directory.
finalinherited
- letsEncryptProduction → bool
-
If
true
runs Let's Encrypt in production mode.finalinherited - logQueue ↔ bool
-
If
false
disables log flush queue.latefinalinherited - logToConsole ↔ bool
-
If
true
log messages to stdout (console).latefinalinherited - name → String
-
The name of this server.
finalinherited
- port → int
-
The listen port of this server (HTTP).
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- securePort → int
-
The listen secure port of this server (HTTPS).
finalinherited
- serverName → String
-
The
server
header value.no setterinherited - serverResponseDelay → Duration?
-
A forced delay in each server response.
Only active if development is
true
.finalinherited - staticFilesCacheControl → String
-
The
cache-control
header for static files.finalinherited - staticFilesCacheMaxContentLength → int
-
The maximum
Content-Length
(in bytes) allowed for a cachedResponse
. Default: 10Mfinalinherited - staticFilesCacheMaxMemorySize → int
-
The maximum memory size (in bytes) for storing all cached
Response
s. Default: 50Mfinalinherited - totalWorkers → int
-
The number of APIServerWorker instances to spawn.
finalinherited
- url → String
-
The local URL of this server.
no setterinherited
- urlHost → String
-
The host of
url
;no setterinherited - useSessionID → bool
-
If
true
the server will use/generate aSESSIONID
for each request. Iffalse
will ignore anySESSIONID
cookie (useful to comply with cookieless servers).finalinherited - version → String
-
The version of this server.
finalinherited
- workerDebugName → String
-
no setter
- workerIndex → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
spawnIsolate(
) → Future< (Isolate?, PortListener?, SendPort?, Future< bool> ?)> -
start(
) → Future< bool> -
Starts this server.
inherited
-
stop(
) → Future< void> -
Stops/closes this server.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
override
-
waitStopped(
) → Future< bool> -
Returns a Future that completes when this server stops.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- initializationTimeout → const Duration