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
static interface ExpectationHandler.AckAction
          Interface, using which ExpectationHandler may confirm or refuse client expectation.
 
Method Summary
 void onExpectAcknowledgement(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 Detail

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 passed ExpectationHandler.AckAction. Use ExpectationHandler.AckAction.acknowledge() to confirm expectation, or ExpectationHandler.AckAction.fail() to refuse it.

Parameters:
request - HttpServletRequest
response - HttpServletRequest
action - ExpectationHandler.AckAction.
Throws:
Exception


Copyright © 2012 Oracle Corporation. All Rights Reserved.