org.simpleframework.http.Response.commit()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中org.simpleframework.http.Response.commit方法的一些代码示例,展示了Response.commit的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.commit方法的具体详情如下:
包路径:org.simpleframework.http.Response
类名称:Response
方法名:commit

Response.commit介绍

[英]This is used to write the headers that where given to the Response. Any further attempts to give headers to the Response will be futile as only the headers that were given at the time of the first commit will be used in the message header.

This also performs some final checks on the headers submitted. This is done to determine the optimal performance of the output. If no specific Connection header has been specified this will set the connection so that HTTP/1.0 closes by default.
[中]这是用来写给Response的标题。任何进一步尝试向Response提供头的尝试都将是徒劳的,因为只有在第一次提交时提供的头才会用于消息头。
这还会对提交的标题执行一些最终检查。这样做是为了确定输出的最佳性能。如果没有指定特定的连接头,这将设置连接,使HTTP/1.0默认关闭。

代码示例

代码示例来源:origin: org.simpleframework/simple-http

/**
* This is used to write the headers that where given to the
* <code>Response</code>. Any further attempts to give headers 
* to the <code>Response</code> will be futile as only the headers
* that were given at the time of the first commit will be used 
* in the message header.
* <p>
* This also performs some final checks on the headers submitted.
* This is done to determine the optimal performance of the 
* output. If no specific Connection header has been specified
* this will set the connection so that HTTP/1.0 closes by default.
*
* @exception IOException thrown if there was a problem writing
*/
public void commit() throws IOException {
 response.commit();
}

代码示例来源:origin: org.simpleframework/simple

/**
* This is used to write the headers that where given to the
* <code>Response</code>. Any further attempts to give headers 
* to the <code>Response</code> will be futile as only the headers
* that were given at the time of the first commit will be used 
* in the message header.
* <p>
* This also performs some final checks on the headers submitted.
* This is done to determine the optimal performance of the 
* output. If no specific Connection header has been specified
* this will set the connection so that HTTP/1.0 closes by default.
*
* @exception IOException thrown if there was a problem writing
*/
public void commit() throws IOException {
 response.commit();
}

代码示例来源:origin: ngallagher/simpleframework

/**
* This is used to write the headers that where given to the
* <code>Response</code>. Any further attempts to give headers 
* to the <code>Response</code> will be futile as only the headers
* that were given at the time of the first commit will be used 
* in the message header.
* <p>
* This also performs some final checks on the headers submitted.
* This is done to determine the optimal performance of the 
* output. If no specific Connection header has been specified
* this will set the connection so that HTTP/1.0 closes by default.
*
* @exception IOException thrown if there was a problem writing
*/
public void commit() throws IOException {
 response.commit();
}

代码示例来源:origin: org.restlet/org.restlet.ext.simple

@Override
public void complete() {
  try {
    // Commit the response
    this.response.commit();
  } catch (Exception ex) {
    getLogger().log(Level.WARNING, "Unable to commit the response", ex);
  }
}

代码示例来源:origin: org.simpleframework/simple

/**
* This is used to compose the HTTP header and send it over the
* transport to the client. Once done the response is committed
* and no more headers can be set, also the semantics of the
* response have been committed and the producer is created.
*/ 
private void commit() throws IOException {
 try {
   response.commit();
 } catch(Exception cause) {
   throw new TransferException("Unable to commit", cause);
 }
}

代码示例来源:origin: org.simpleframework/simple-http

/**
* This is used to compose the HTTP header and send it over the
* transport to the client. Once done the response is committed
* and no more headers can be set, also the semantics of the
* response have been committed and the encoder is created.
*/ 
private void commit() throws IOException {
 try {
   response.commit();
 } catch(Exception cause) {
   throw new ResponseException("Unable to commit", cause);
 }
}

代码示例来源:origin: ngallagher/simpleframework

/**
* This is used to compose the HTTP header and send it over the
* transport to the client. Once done the response is committed
* and no more headers can be set, also the semantics of the
* response have been committed and the encoder is created.
*/ 
private void commit() throws IOException {
 try {
   response.commit();
 } catch(Exception cause) {
   throw new ResponseException("Unable to commit", cause);
 }
}

相关文章