HyperioAzkadev class

Server application class

This is the core of the server application. Generally you would create one for each app.

Inheritance
Available extensions

Constructors

HyperioAzkadev({String pathPrefix = "", HyperioAzkadevLogType hyperioLogType = HyperioAzkadevLogType.info, int simultaneousProcessing = 1000000000, HyperioAzkadevRouteOnNotFoundFunction? onNotFound, HyperioAzkadevRouteOnErrorFunction? onError})
Creates a new HyperioAzkadevNative application.

Properties

app HyperioAzkadev
HyperioAzkadevUncompleteDocumentation
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
hyperioLogType HyperioAzkadevLogType
HyperioAzkadevUncompleteDocumentation
finalinherited
logWriter ↔ void Function(dynamic messageFn(), HyperioAzkadevLogType type)
Writer to handle internal logging.
getter/setter pairinherited
onError HyperioAzkadevRouteOnErrorFunction?
Optional handler for when the server throws an unhandled error
getter/setter pairinherited
onNotFound HyperioAzkadevRouteOnNotFoundFunction?
Optional handler for when a route is not found
getter/setter pairinherited
pathPrefix String
HyperioAzkadevUncompleteDocumentation
getter/setter pairinherited
requestQueue Queue
Incoming request queue
getter/setter pair
routes List<HttpRoute>
List of routes
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
server HyperioAzkadevHttpServer?
HttpServer instance from the dart:io library
getter/setter pairinherited
simultaneousProcessing int
HyperioAzkadevUncompleteDocumentation
getter/setter pairinherited
typeHandlers List<TypeHandler>
An array of TypeHandler that HyperioAzkadevNative walks through in order to determine if it can handle a value returned from a route.
getter/setter pairinherited

Methods

addRoute(HttpRoute route) → void
HyperioAzkadevUncompleteDocumentation
inherited
all(String path, FutureOr callback(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res), {List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []}) HttpRoute
Create a route that listens on all methods
inherited
close({bool force = true}) Future<void>
Close the server and clean up any resources
override
createRoute(HyperioAzkadevMethodType method, String path, FutureOr callback(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res), [List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []]) HttpRoute
HyperioAzkadevUncompleteDocumentation
inherited
delete(String path, FutureOr callback(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res), {List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []}) HttpRoute
Create a delete route
inherited
ensureInitialized() → void
HyperioAzkadevUncompleteDocumentation
override
get(String path, FutureOr callback(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res), {List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []}) HttpRoute
Create a get route
inherited
Create a head route
inherited
listen({int port = 3000, dynamic bindIp = '0.0.0.0', bool shared = true, int backlog = 0}) Future<HyperioAzkadevHttpServer>
Call this function to fire off the server.
override
listenSecure({required SecurityContext securityContext, int port = 3000, dynamic bindIp = '0.0.0.0', bool shared = true, int backlog = 0}) Future<HyperioAzkadevHttpServer>
HyperioAzkadevUncompleteDocumentation
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(String path, FutureOr callback(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res), {List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []}) HttpRoute
Create an options route
inherited
parsePattern(String path) String
HyperioAzkadevUncompleteDocumentation
inherited
patch(String path, FutureOr callback(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res), {List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []}) HttpRoute
Create a patch route
inherited
post(String path, FutureOr callback(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res), {List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []}) HttpRoute
Create a post route
inherited
printRoutes() → void
Print out the registered routes to the console
inherited
put(String path, FutureOr callback(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res), {List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []}) HttpRoute
Create a put route
inherited
route(String path, {List<FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const []}) NestedRoute

Available on HyperioAzkadev, provided by the NestedRouteExtension extension

Creates one or multiple route segments that can be used as a common base for specifying routes with get, post, etc.
tcpSocket({required FutureOr<HyperioAzkadevTcpSocketConnection> onTcpSocket()}) → void
HyperioAzkadevUncompleteDocumentation
override
toString() String
A string representation of this object.
inherited
websocket({required String path, required FutureOr<HyperioAzkadevWebSocketConnection> onWebSocket()}) HttpRoute
HyperioAzkadevUncompleteDocumentation
override

Operators

operator ==(Object other) bool
The equality operator.
inherited