Package org.glassfish.grizzly.servlet
Interface ExpectationHandler
-
public interface ExpectationHandlerHandler, responsible for processing Expect: header in a HTTP requests, for example "Expect: 100-Continue"- Author:
- Alexey Stashok
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceExpectationHandler.AckActionInterface, using whichExpectationHandlermay confirm or refuse client expectation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonExpectAcknowledgement(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ExpectationHandler.AckAction action)Method is getting called by framework if HTTP request contains "Expect" header.
-
-
-
Method Detail
-
onExpectAcknowledgement
void onExpectAcknowledgement(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, ExpectationHandler.AckAction action) throws ExceptionMethod is getting called by framework if HTTP request contains "Expect" header. Depending on request information, implementation may decide to accept or refuse the HTTP message payload, using passedExpectationHandler.AckAction. UseExpectationHandler.AckAction.acknowledge()to confirm expectation, orExpectationHandler.AckAction.fail()to refuse it.- Parameters:
request-HttpServletRequestresponse-HttpServletRequestaction-ExpectationHandler.AckAction.- Throws:
Exception
-
-