Interface HttpRequestMethod
public interface HttpRequestMethod
Defines constants for standard and extended HTTP request methods used by Fluxzero's web handling system.
This interface provides:
- String constants for standard HTTP verbs (e.g.
GET,POST) - Custom pseudo-methods for WebSocket lifecycle events (e.g.
WS_HANDSHAKE,WS_MESSAGE) - A wildcard constant (
*) for method-agnostic routing - A helper method to detect whether a method is a WebSocket variant
Usage
These constants are used throughout the web routing and handler matching infrastructure:- In
WebPatternto define method constraints - By
WebHandlerMatcherduring dispatch resolution - In
WebRequestmetadata to interpret incoming requests
The extended WebSocket methods are used internally to distinguish between phases of a WebSocket session, such as handshake negotiation, message delivery, or connection closure.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMatches any HTTP method (wildcard).static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringRepresents an explicit closure of a WebSocket session.static final StringSynthetic method representing a WebSocket handshake (initial HTTP upgrade).static final StringRepresents a message sent over an established WebSocket connection.static final StringRepresents the WebSocket session being formally opened after handshake.static final StringRepresents a pong response received for a ping message. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic booleanisWebsocket(String requestMethod) Determines whether the given method string represents a WebSocket-specific method.
-
Field Details
-
ANY
-
GET
- See Also:
-
POST
- See Also:
-
PUT
- See Also:
-
PATCH
- See Also:
-
DELETE
- See Also:
-
HEAD
- See Also:
-
OPTIONS
- See Also:
-
TRACE
- See Also:
-
WS_HANDSHAKE
Synthetic method representing a WebSocket handshake (initial HTTP upgrade).- See Also:
-
WS_OPEN
Represents the WebSocket session being formally opened after handshake.- See Also:
-
WS_MESSAGE
Represents a message sent over an established WebSocket connection.- See Also:
-
WS_PONG
-
WS_CLOSE
-
-
Method Details
-
isWebsocket
Determines whether the given method string represents a WebSocket-specific method.- Parameters:
requestMethod- the method string to check- Returns:
trueif the method is one of theWS_*variants;falseotherwise
-