Class MessageTypeRequirement
java.lang.Object
de.craftsblock.craftsnet.api.requirements.Requirement<T,RouteRegistry.EndpointMapping>
de.craftsblock.craftsnet.api.requirements.websocket.WebSocketRequirement<Frame>
de.craftsblock.craftsnet.api.requirements.websocket.MessageTypeRequirement
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
ConstructorsConstructorDescriptionConstructs a new websocket message type requirement. -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplies(Frame frame, RouteRegistry.EndpointMapping endpointMapping) Checks if the requirement applies given the specified websocket message and socket mapping.Methods inherited from class de.craftsblock.craftsnet.api.requirements.Requirement
getAnnotation
-
Constructor Details
-
MessageTypeRequirement
public MessageTypeRequirement()Constructs a new websocket message type requirement.
-
-
Method Details
-
applies
Checks if the requirement applies given the specified websocket message and socket mapping.- Specified by:
appliesin classRequirement<Frame,RouteRegistry.EndpointMapping> - Parameters:
frame- the websocket message frameendpointMapping- the socket mapping- Returns:
trueif the requirement applies,falseotherwise
-