Package io.fluxcapacitor.javaclient.web
Interface HttpRequestMethod
public interface HttpRequestMethod
Defines constants for standard and extended HTTP request methods used by Flux Capacitor'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
WebPattern
to define method constraints - By
WebHandlerMatcher
during dispatch resolution - In
WebRequest
metadata 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 String
Matches any HTTP method (wildcard).static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Represents an explicit closure of a WebSocket session.static final String
Synthetic method representing a WebSocket handshake (initial HTTP upgrade).static final String
Represents a message sent over an established WebSocket connection.static final String
Represents the WebSocket session being formally opened after handshake.static final String
Represents a pong response received for a ping message. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic boolean
isWebsocket
(String requestMethod) Determines whether the given method string represents a WebSocket-specific method.
-
Field Details
-
ANY
Matches any HTTP method (wildcard). Useful for fallback routing.- See Also:
-
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
Represents a pong response received for a ping message.- See Also:
-
WS_CLOSE
Represents an explicit closure of a WebSocket session.- See Also:
-
-
Method Details
-
isWebsocket
Determines whether the given method string represents a WebSocket-specific method.- Parameters:
requestMethod
- the method string to check- Returns:
true
if the method is one of theWS_*
variants;false
otherwise
-