Package org.glassfish.grizzly.servlet
Interface ExpectationHandler
public interface ExpectationHandler
Handler, responsible for processing Expect: header in a HTTP requests,
for example "Expect: 100-Continue"
- Author:
- Alexey Stashok
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface, using whichExpectationHandlermay confirm or refuse client expectation. -
Method Summary
Modifier and TypeMethodDescriptionvoidonExpectAcknowledgement(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ExpectationHandler.AckAction action) Method is getting called by framework if HTTP request contains "Expect" header.
-
Method Details
-
onExpectAcknowledgement
void onExpectAcknowledgement(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ExpectationHandler.AckAction action) throws Exception Method 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
-