Top Description Inners Methods
org.glassfish.grizzly.servlet

public Interface ExpectationHandler

Imports
java.io.IOException, jakarta.servlet.http.HttpServletRequest, .HttpServletResponse

Handler, responsible for processing Expect: header in a HTTP requests, for example "Expect: 100-Continue"
Author
Alexey Stashok

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ExpectationHandler.AckAction

Interface, using which ExpectationHandler may confirm or refuse client expectation.

Method Summary

Modifier and TypeMethod and Description
public void
onExpectAcknowledgement(final HttpServletRequest request, final HttpServletResponse response, final ExpectationHandler.AckAction action)

Method is getting called by framework if HTTP request contains "Expect" header.

Method Detail

onExpectAcknowledgementback to summary
public void onExpectAcknowledgement(final HttpServletRequest request, final HttpServletResponse response, final 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 passed AckAction. Use AckAction#acknowledge() to confirm expectation, or AckAction#fail() to refuse it.

Parameters
request:HttpServletRequest

HttpServletRequest

response:HttpServletResponse

HttpServletRequest

action:ExpectationHandler.AckAction

AckAction.

org.glassfish.grizzly.servlet back to summary

public Interface ExpectationHandler.AckAction

Known Direct Implementers
org.glassfish.grizzly.servlet.ServletHandler.AckActionImpl

Interface, using which ExpectationHandler may confirm or refuse client expectation.

Method Summary

Modifier and TypeMethod and Description
public void
acknowledge()

Acknowledges a client that server wants to receive payload.

public void
fail()

Notifies a client that server doesn't want to process HTTP message payload.

Method Detail

acknowledgeback to summary
public void acknowledge() throws IOException

Acknowledges a client that server wants to receive payload.

failback to summary
public void fail() throws IOException

Notifies a client that server doesn't want to process HTTP message payload.