Package de.espirit.firstspirit.web
Class ConnectionExtractor
java.lang.Object
de.espirit.firstspirit.web.ConnectionExtractor
This class may be used to extract the current
Connection associated
with a HttpServletRequest.- Since:
- 5.2.1604
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ConnectionextractConnectionFromRequest(@NotNull jakarta.servlet.http.HttpServletRequest request) Extracts the current establishedConnectionto the FirstSpirit server from anHttpServletRequest.
-
Constructor Details
-
ConnectionExtractor
public ConnectionExtractor()
-
-
Method Details
-
extractConnectionFromRequest
@Nullable public static @Nullable Connection extractConnectionFromRequest(@NotNull @NotNull jakarta.servlet.http.HttpServletRequest request) Extracts the current establishedConnectionto the FirstSpirit server from anHttpServletRequest. If the HTTP session is ande.espirit.firstspirit.io.servlet.HttpSubSession, the connection for the subsession will be returned instead of the one opened by the main HTTP session.If the connection can not be found or it is not established at the moment,
nullis returned.- Parameters:
request- The servlet request to extract the connection from, must not benull.- Returns:
- the established connection associated with the request. May be
nullif no connection is found or if it is not established. - Since:
- 5.2.1604
-