Manages listening for HTTP requests and delivering them to RequestSink instances.

An Aqueduct application creates instances of this type to pair an HTTP server and an instance of an application-specific RequestSink. Instances are created by Application and shouldn't be created otherwise.

Constructors

ApplicationServer(ApplicationConfiguration configuration, int identifier, { bool captureStack: false })

Creates an instance of this type.

Properties

captureStack → bool

Used during debugging to capture the stacktrace better for asynchronous calls.

read / write
configuration ApplicationConfiguration

The configuration this instance used to start its sink.

read / write
hubSink → EventSink

Target for sending messages to other RequestSink isolates.

read / write
identifier → int

The unique identifier of this instance.

read / write
logger Logger

The logger of this instance

read-only
requiresHTTPS → bool

read-only
server → HttpServer

The underlying HttpServer.

read / write
sink RequestSink

The instance of RequestSink serving requests.

read / write
hashCode → int

The hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

close() → Future

didOpen() → Future

Invoked when this server becomes ready receive requests.

sendApplicationEvent(event) → void

start(RequestSink sink, { bool shareHttpServer: false }) → Future

Starts this instance, allowing it to receive HTTP requests.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited