本文整理了Java中org.glassfish.grizzly.http.server.Response.sendAcknowledgement
方法的一些代码示例,展示了Response.sendAcknowledgement
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.sendAcknowledgement
方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Response
类名称:Response
方法名:sendAcknowledgement
[英]Send an acknowledgment of a request. An acknowledgment in this case is simply an HTTP response status line, i.e. HTTP/1.1 [STATUS] [REASON-PHRASE][[$0$]]
[中]
代码示例来源:origin: javaee/grizzly
@Override
public void acknowledge() throws IOException {
if (isAcknowledged) {
throw new IllegalStateException("Already acknowledged");
}
isAcknowledged = true;
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
}
代码示例来源:origin: javaee/grizzly
@Override
public void acknowledge() throws IOException {
if (isAcknowledged) {
throw new IllegalStateException("Already acknowledged");
}
isAcknowledged = true;
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
@Override
public void acknowledge() throws IOException {
if (isAcknowledged) {
throw new IllegalStateException("Already acknowledged");
}
isAcknowledged = true;
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
}
代码示例来源:origin: javaee/grizzly
@Override
public void acknowledge() throws IOException {
if (isAcknowledged) {
throw new IllegalStateException("Already acknowledged");
}
isAcknowledged = true;
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
}
代码示例来源:origin: javaee/grizzly
@Override
public void acknowledge() throws IOException {
if (isAcknowledged) {
throw new IllegalStateException("Already acknowledged");
}
isAcknowledged = true;
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
}
代码示例来源:origin: javaee/grizzly
@Override
public void acknowledge() throws IOException {
if (isAcknowledged) {
throw new IllegalStateException("Already acknowledged");
}
isAcknowledged = true;
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
}
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Send an acknowledgment of a request.
*
* @exception IOException if an input/output error occurs
*/
public void sendAcknowledgement()
throws IOException {
if (isCommitted())
return;
// Ignore any call from an included servlet
if (included)
return;
coyoteResponse.sendAcknowledgement();
}
代码示例来源:origin: javaee/grizzly
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: javaee/grizzly
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: javaee/grizzly
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: javaee/grizzly
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: javaee/grizzly
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: javaee/grizzly
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: javaee/grizzly
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server
/**
* The default implementation will acknowledge an <code>Expect: 100-Continue</code>
* with a response line with the status 100 followed by the final response
* to this request.
*
* @param request the {@link Request}.
* @param response the {@link Response}.
*
* @return <code>true</code> if request processing should continue after
* acknowledgment of the expectation, otherwise return <code>false</code>.
*
* @throws IOException if an error occurs sending the acknowledgment.
*/
protected boolean sendAcknowledgment(final Request request,
final Response response)
throws IOException {
if ("100-continue".equalsIgnoreCase(request.getHeader(Header.Expect))) {
response.setStatus(HttpStatus.CONINTUE_100);
response.sendAcknowledgement();
return true;
} else {
response.setStatus(HttpStatus.EXPECTATION_FAILED_417);
return false;
}
}
内容来源于网络,如有侵权,请联系作者删除!