Class WSDomainRequirement
java.lang.Object
de.craftsblock.craftsnet.api.requirements.Requirement<T,RouteRegistry.EndpointMapping>
de.craftsblock.craftsnet.api.requirements.websocket.WebSocketRequirement<WebSocketClient>
de.craftsblock.craftsnet.api.requirements.websocket.WSDomainRequirement
A specific websocket requirement that checks if the domain of a websocket connection matches certain criteria.
- Since:
- 3.0.5-SNAPSHOT
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplies(WebSocketClient client, RouteRegistry.EndpointMapping endpointMapping) Checks if the requirement applies given the specified websocket client and socket mapping.Methods inherited from class de.craftsblock.craftsnet.api.requirements.Requirement
getAnnotation
-
Constructor Details
-
WSDomainRequirement
public WSDomainRequirement()Constructs a new websocket domain requirement.
-
-
Method Details
-
applies
Checks if the requirement applies given the specified websocket client and socket mapping.- Specified by:
appliesin classRequirement<WebSocketClient,RouteRegistry.EndpointMapping> - Parameters:
client- the websocket clientendpointMapping- the socket mapping- Returns:
trueif the requirement applies,falseotherwise
-