DuplicateRule class
Attempt to register a duplicate rule in a pipeline.
A rule already exists in the pipeline for the same HTTP method and path.
This is treated as an error, because it usually a sign of a coding error.
If there are duplicate rules, the first one will match the request and the subsequent ones will normally never get used. The only situation where duplicate rules are useful is if the earlier rule(s) deliberately returned null, so the rule matching process continues and tries to match the request to subsequent rules. That is, the application deliberately wants a single request to be processed by multiple request handlers. This rare situation can be implemented by putting subsequent rules into different pipelines. There is no restriction on duplicate rules if they appear in different pipelines. The restriction is only on duplicate rules in the same pipeline.
- Inheritance
-
- Object
- WoomeraException
- DuplicateRule
- Implementers
Constructors
- DuplicateRule(String method, Pattern pattern, RequestHandler newHandler, RequestHandler existingHandler)
- Constructor
Properties
- existingHandler → RequestHandler
-
The request handler that has already been registered in the pipeline.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- method → String
-
HTTP method
final
- newHandler → RequestHandler
-
The new request handler being registered.
final
- pattern → Pattern
-
Path
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.
inherited