-
- 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 aServletRequest
andServletResponse
and returns no result. This is a specialization ofBiConsumer
that allowsIOException
to be thrown.- Author:
- Rob Spoor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
accept(ServletRequest request, ServletResponse response)
Performs this operation on the given request and response.default ServletConsumer
andThen(ServletConsumer after)
Returns a composedServletConsumer
that performs, in sequence, this operation followed by theafter
operation.
-
-
-
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 composedServletConsumer
that performs, in sequence, this operation followed by theafter
operation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, theafter
operation will not be performed.- Parameters:
after
- The operation to perform after this operation.- Returns:
- A composed
ServletConsumer
that performs in sequence this operation followed by theafter
operation. - Throws:
NullPointerException
- Ifafter
isnull
.
-
-