[java-opensaml] 04/05: IDP-1793 Use Suppliers for HttpRequest/Response
Rod Widdowson
rdw at steadingsoftware.com
Sun Jul 31 14:33:16 UTC 2022
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch dev/4/IDP-1793
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=bdc53934d865b3434a61553e61ad7193ed13c067
commit bdc53934d865b3434a61553e61ad7193ed13c067
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Jul 31 14:18:51 2022 +0100
IDP-1793 Use Suppliers for HttpRequest/Response
https://shibboleth.atlassian.net/browse/IDP-1793
org.opensaml.messaging.decoder.servlet.HttpServletRequestMessageDecoder
(an API interface) gains a setter for a Supplier for the HttpServletRequest
---
.../servlet/HttpServletRequestMessageDecoder.java | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/decoder/servlet/HttpServletRequestMessageDecoder.java b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/decoder/servlet/HttpServletRequestMessageDecoder.java
index 924fac03e..048fa468b 100644
--- a/opensaml-messaging-api/src/main/java/org/opensaml/messaging/decoder/servlet/HttpServletRequestMessageDecoder.java
+++ b/opensaml-messaging-api/src/main/java/org/opensaml/messaging/decoder/servlet/HttpServletRequestMessageDecoder.java
@@ -17,6 +17,8 @@
package org.opensaml.messaging.decoder.servlet;
+import java.util.function.Supplier;
+
import javax.annotation.Nullable;
import javax.servlet.http.HttpServletRequest;
@@ -30,16 +32,25 @@ public interface HttpServletRequestMessageDecoder extends MessageDecoder {
/**
* Get the HTTP servlet request on which to operate.
- *
+ *
* @return the HTTP servlet request
*/
@Nullable HttpServletRequest getHttpServletRequest();
/**
* Set the HTTP servlet request on which to operate.
- *
+ *
* @param request the HTTP servlet request
*/
+ @Deprecated(forRemoval = true, since="4.3")
void setHttpServletRequest(@Nullable final HttpServletRequest request);
-
+
+ /**
+ * Set the supplier for the HTTP servlet request on which to operate.
+ *
+ * @param requestSupplier the HTTP servlet request
+ */
+ default void setHttpServletRequestSupplier(@Nullable final Supplier<HttpServletRequest> requestSupplier) {
+ setHttpServletRequest(requestSupplier.get());
+ }
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list