Class HTTPDomainRequirement
java.lang.Object
de.craftsblock.craftsnet.api.requirements.Requirement<Request,RouteRegistry.EndpointMapping>
de.craftsblock.craftsnet.api.requirements.web.WebRequirement
de.craftsblock.craftsnet.api.requirements.web.HTTPDomainRequirement
A specific web requirement that checks if the domain of an HTTP request matches certain criteria.
- Since:
- 3.0.5-SNAPSHOT
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplies(Request request, RouteRegistry.EndpointMapping endpointMapping) Checks if the requirement applies given the specified request and route mapping.Methods inherited from class de.craftsblock.craftsnet.api.requirements.Requirement
getAnnotation
-
Constructor Details
-
HTTPDomainRequirement
public HTTPDomainRequirement()Constructs a new HTTP domain requirement.
-
-
Method Details
-
applies
Checks if the requirement applies given the specified request and route mapping.- Specified by:
appliesin classRequirement<Request,RouteRegistry.EndpointMapping> - Parameters:
request- the HTTP requestendpointMapping- the route mapping- Returns:
trueif the requirement applies,falseotherwise
-