Package org.glassfish.tyrus.servlet

Examples of org.glassfish.tyrus.servlet.TyrusHttpUpgradeHandler


  @Override
  protected void handleSuccess(HttpServletRequest request, HttpServletResponse response,
      UpgradeInfo upgradeInfo, TyrusUpgradeResponse upgradeResponse) throws IOException, ServletException {

    TyrusHttpUpgradeHandler handler = request.upgrade(TyrusHttpUpgradeHandler.class);
    Writer servletWriter = servletWriterHelper.newInstance(handler);
    handler.preInit(upgradeInfo, servletWriter, request.getUserPrincipal() != null);

    response.setStatus(upgradeResponse.getStatus());
    for (Map.Entry<String, List<String>> entry : upgradeResponse.getHeaders().entrySet()) {
      response.addHeader(entry.getKey(), Utils.getHeaderFromList(entry.getValue()));
    }
View Full Code Here

TOP

Related Classes of org.glassfish.tyrus.servlet.TyrusHttpUpgradeHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.