-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ServletConsumer
An operation that takes aServletRequestandServletResponseand returns no result. This is a specialization ofBiConsumerthat allowsIOExceptionto be thrown.- Author:
- Rob Spoor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaccept(ServletRequest request, ServletResponse response)Performs this operation on the given request and response.default ServletConsumerandThen(ServletConsumer after)Returns a composedServletConsumerthat performs, in sequence, this operation followed by theafteroperation.
-
-
-
Method Detail
-
accept
void accept(ServletRequest request, ServletResponse response) throws IOException
Performs this operation on the given request and response.- Parameters:
request- The request to operate on.response- The response to operate on.- Throws:
IOException- If an I/O error occurs
-
andThen
default ServletConsumer andThen(ServletConsumer after)
Returns a composedServletConsumerthat performs, in sequence, this operation followed by theafteroperation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, theafteroperation will not be performed.- Parameters:
after- The operation to perform after this operation.- Returns:
- A composed
ServletConsumerthat performs in sequence this operation followed by theafteroperation. - Throws:
NullPointerException- Ifafterisnull.
-
-