ServerRule class
Represents a rule for processing HTTP requests.
A rule consists of a pattern and a handler. If the pattern matches the path of the HTTP request, then the handler is invoked to process the request.
Rules are registered with instances of a ServerPipeline (for a particular HTTP method). Rules can be explicitly created and added to a pipeline using the ServerPipeline.register method. Or they can be identified by annotating request handlers (functions or static methods) with Handles objects and then processed using a program that uses the woomera_server_gen package.
Constructors
- ServerRule(String pathPattern, RequestHandler handler)
- Constructor.
Properties
- handler → RequestHandler
-
The request handler callback method.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- pattern → Pattern
-
Pattern that the HTTP request's path must match for the rule to be used.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override