org.glassfish.grizzly.http.server.Request.getNote()方法的使用及代码示例

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

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

Request.getNote介绍

[英]Return the Note value associated with this Request, or null if no such binding exists. Use #createNote(java.lang.String) to create a new Note.
[中]返回与此请求关联的注释值,如果不存在此类绑定,则返回null。使用#createNote(java.lang.String)创建新便笺。

代码示例

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

static HttpServletResponseImpl getServletResponse(final Request request) {
    return request.getNote(SERVLET_RESPONSE_NOTE);
  }
}

代码示例来源:origin: javaee/grizzly

static HttpServletResponseImpl getServletResponse(final Request request) {
    return request.getNote(SERVLET_RESPONSE_NOTE);
  }
}

代码示例来源:origin: javaee/grizzly

static HttpServletResponseImpl getServletResponse(final Request request) {
    return request.getNote(SERVLET_RESPONSE_NOTE);
  }
}

代码示例来源:origin: javaee/grizzly

static HttpServletRequestImpl getServletRequest(final Request request) {
  return request.getNote(SERVLET_REQUEST_NOTE);
}

代码示例来源:origin: javaee/grizzly

static HttpServletResponseImpl getServletResponse(final Request request) {
    return request.getNote(SERVLET_RESPONSE_NOTE);
  }
}

代码示例来源:origin: javaee/grizzly

static HttpServletResponseImpl getServletResponse(final Request request) {
    return request.getNote(SERVLET_RESPONSE_NOTE);
  }
}

代码示例来源:origin: javaee/grizzly

static HttpServletResponseImpl getServletResponse(final Request request) {
    return request.getNote(SERVLET_RESPONSE_NOTE);
  }
}

代码示例来源:origin: javaee/grizzly

static HttpServletRequestImpl getServletRequest(final Request request) {
  return request.getNote(SERVLET_REQUEST_NOTE);
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

static HttpServletRequestImpl getServletRequest(final Request request) {
  return request.getNote(SERVLET_REQUEST_NOTE);
}

代码示例来源:origin: javaee/grizzly

static HttpServletRequestImpl getServletRequest(final Request request) {
  return request.getNote(SERVLET_REQUEST_NOTE);
}

代码示例来源:origin: javaee/grizzly

static HttpServletRequestImpl getServletRequest(final Request request) {
  return request.getNote(SERVLET_REQUEST_NOTE);
}

代码示例来源:origin: javaee/grizzly

static HttpServletRequestImpl getServletRequest(final Request request) {
  return request.getNote(SERVLET_REQUEST_NOTE);
}

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

@Override
  public void onAfterService(final Request request) {
    final MappingData mappingData = request.getNote(MAPPING_DATA);
    if (mappingData != null) {
      mappingData.recycle();
    }
  }
}

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

HttpHandler map(final Request req, final DataChunk decodedURI,
    MappingData mappingData) throws Exception {
  
  if (mappingData == null) {
    mappingData = req.getNote(MAPPING_DATA);
  }
  // Map the request to its Adapter/Container and also it's Servlet if
  // the request is targetted to the CoyoteAdapter.
  mapper.map(req.getRequest().serverName(), decodedURI, mappingData);
  updatePaths(req, mappingData);
  ContextRootInfo contextRootInfo;
  if (mappingData.context != null && (mappingData.context instanceof ContextRootInfo
      || mappingData.wrapper instanceof ContextRootInfo)) {
    if (mappingData.wrapper != null) {
      contextRootInfo = (ContextRootInfo) mappingData.wrapper;
    } else {
      contextRootInfo = (ContextRootInfo) mappingData.context;
    }
    return contextRootInfo.getHttpHandler();
  } else if (mappingData.context != null &&
      "com.sun.enterprise.web.WebModule".equals(mappingData.context.getClass().getName())) {
    return mapper.getHttpHandler();
  }
  return null;
}

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

@Override
  public void onAfterService(final org.glassfish.grizzly.http.server.Request request) {
    final Request servletRequest = request.getNote(CATALINA_REQUEST_NOTE);
    final Response servletResponse = request.getNote(CATALINA_RESPONSE_NOTE);
    if (servletRequest != null) {
      try {
        if (!servletRequest.isUpgrade()) {
          servletResponse.finishResponse();
        } else {
          servletResponse.setUpgrade(servletRequest.isUpgrade());
        }
      } catch (Exception e) {
        log.log(Level.SEVERE, LogFacade.REQUEST_PROCESSING_EXCEPTION, e);
      } finally {
        try {
          servletRequest.unlockSession();
        } finally {
          servletRequest.recycle();
          servletResponse.recycle();
        }
      }
    }
  }
}

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

try {
  MappingData mappingData = (MappingData) req.getNote(ContainerMapper.MAPPING_DATA);
  mappingData.recycle();

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

localDecodedURI = req.getNote(DATA_CHUNK);
if (localDecodedURI == null) {
  localDecodedURI = DataChunk.newInstance();

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

.getRequestURIRef().getDecodedRequestURIBC(isAllowEncodedSlash());
mappingData = request.getNote(MAPPING_DATA);
if (mappingData == null) {
  mappingData = new MappingData();

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

Request request = req.getNote(CATALINA_REQUEST_NOTE);
Response response = req.getNote(CATALINA_RESPONSE_NOTE);
MappingData md = req.getNote(MAPPING_DATA);
final boolean v3Enabled = md != null;
if (request == null) {

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

localDecodedURI = req.getNote(DATA_CHUNK);
if (localDecodedURI == null) {
  localDecodedURI = DataChunk.newInstance();

相关文章

Request类方法