org.apache.catalina.connector.Response.flushBuffer()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(124)

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

Response.flushBuffer介绍

[英]Flush the buffer and commit this response.
[中]刷新缓冲区并提交此响应。

代码示例

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6

public void flushBuffer() throws java.io.IOException{
  response.flushBuffer();
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

@Override
  public Void run() throws IOException {
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
}

代码示例来源:origin: jboss.web/jbossweb

public Object run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

@Override
  public Void run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: codefollower/Tomcat-Research

@Override
  public Void run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

@Override
  public Void run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

@Override
  public Void run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

@Override
  public Void run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: tomcat/catalina

public Object run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: org.jboss.web/jbossweb

public Object run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: org.glassfish.main.web/web-core

public Void run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

@Override
  public Void run() throws IOException {
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

@Override
  public Void run() throws IOException{
    response.setAppCommitted(true);
    response.flushBuffer();
    return null;
  }
});

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

public void doUpgrade(UpgradeInbound inbound)
    throws IOException {
  coyoteRequest.action(ActionCode.UPGRADE, inbound);
  // Output required by RFC2616. Protocol specific headers should have
  // already been set.
  response.setStatus(HttpServletResponse.SC_SWITCHING_PROTOCOLS);
  response.flushBuffer();
}

代码示例来源:origin: com.github.waffle/waffle-tomcat6

/**
 * Send a 401 Unauthorized along with protocol authentication headers.
 * 
 * @param response
 *            HTTP Response
 */
protected void sendUnauthorized(final Response response) {
  try {
    for (final String protocol : this.protocols) {
      response.addHeader("WWW-Authenticate", protocol);
    }
    response.setHeader("Connection", "close");
    response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
    response.flushBuffer();
  } catch (final IOException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: com.github.dblock.waffle/waffle-tomcat6

/**
 * Send a 401 Unauthorized along with protocol authentication headers.
 * 
 * @param response
 *            HTTP Response
 */
protected void sendUnauthorized(final Response response) {
  try {
    for (final String protocol : this.protocols) {
      response.addHeader("WWW-Authenticate", protocol);
    }
    response.setHeader("Connection", "close");
    response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
    response.flushBuffer();
  } catch (final IOException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: com.github.dblock.waffle/waffle-tomcat5

/**
 * Send a 401 Unauthorized along with protocol authentication headers.
 * 
 * @param response
 *            HTTP Response
 */
protected void sendUnauthorized(final Response response) {
  try {
    for (String protocol : this.protocols) {
      response.addHeader("WWW-Authenticate", protocol);
    }
    response.setHeader("Connection", "close");
    response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
    response.flushBuffer();
  } catch (IOException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

@Override
public void flushBuffer() throws IOException {
  if (isFinished()) {
    return;
  }
  if (SecurityUtil.isPackageProtectionEnabled()) {
    try{
      AccessController.doPrivileged(new FlushBufferPrivilegedAction(response));
    } catch(PrivilegedActionException e) {
      Exception ex = e.getException();
      if (ex instanceof IOException) {
        throw (IOException)ex;
      }
    }
  } else {
    response.setAppCommitted(true);
    response.flushBuffer();
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

@Override
public void flushBuffer() throws IOException {
  if (isFinished()) {
    return;
  }
  if (SecurityUtil.isPackageProtectionEnabled()) {
    try{
      AccessController.doPrivileged(new FlushBufferPrivilegedAction(response));
    } catch(PrivilegedActionException e) {
      Exception ex = e.getException();
      if (ex instanceof IOException) {
        throw (IOException)ex;
      }
    }
  } else {
    response.setAppCommitted(true);
    response.flushBuffer();
  }
}

代码示例来源:origin: com.tomitribe.tribestream/tribestream-container

private void flushResponseBytes(final long size) throws IOException {
  context.getResponse().flushBuffer();
  context.getResponse().finishResponse();
  context.getEventHandler().info("proxy", "Copied " + size + " bytes");
  context.getOut().setResponseSize(size);
}

相关文章

Response类方法