本文整理了Java中org.glassfish.grizzly.http.server.Request.getMethod
方法的一些代码示例,展示了Request.getMethod
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getMethod
方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Request
类名称:Request
方法名:getMethod
[英]Return the HTTP request method used in this Request.
[中]返回此请求中使用的HTTP请求方法。
代码示例来源:origin: opentripplanner/OpenTripPlanner
if (request.getMethod() == Method.HEAD) {
} else if (request.getMethod() == Method.GET && "status".equals(pathComponents[1])) {
} else if (request.getMethod() == Method.POST) {
broker.registerSinglePointChannel(graphAffinity, wr);
} else if (request.getMethod() == Method.DELETE) {
代码示例来源:origin: jersey/jersey
@Override
public void service(final Request request, final Response response) {
final ResponseWriter responseWriter = new ResponseWriter(response, configSetStatusOverSendError);
try {
logger.debugLog("GrizzlyHttpContainer.service(...) started");
URI baseUri = getBaseUri(request);
URI requestUri = getRequestUri(request);
final ContainerRequest requestContext = new ContainerRequest(baseUri,
requestUri, request.getMethod().getMethodString(),
getSecurityContext(request), new GrizzlyRequestPropertiesDelegate(request));
requestContext.setEntityStream(request.getInputStream());
for (final String headerName : request.getHeaderNames()) {
requestContext.headers(headerName, request.getHeaders(headerName));
}
requestContext.setWriter(responseWriter);
requestContext.setRequestScopedInitializer(injectionManager -> {
injectionManager.<Ref<Request>>getInstance(RequestTYPE).set(request);
injectionManager.<Ref<Response>>getInstance(ResponseTYPE).set(response);
});
appHandler.handle(requestContext);
} finally {
logger.debugLog("GrizzlyHttpContainer.service(...) finished");
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: javaee/grizzly
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public String getMethod() {
if (request == null) {
throw new IllegalStateException("Null request object");
}
return request.getMethod().getMethodString();
}
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.getMethod().getMethodString();
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public String getMethod() {
if (request == null) {
throw new IllegalStateException("Null request object");
}
return request.getMethod().getMethodString();
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public String getMethod() {
if (request == null) {
throw new IllegalStateException("Null request object");
}
return request.getMethod().getMethodString();
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
/**
* {@inheritDoc}
*/
@Override
public String getMethod() {
if (request == null) {
throw new IllegalStateException("Null request object");
}
return request.getMethod().getMethodString();
}
代码示例来源:origin: javaee/grizzly
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: javaee/grizzly
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: javaee/grizzly
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public String getMethod() {
if (request == null) {
throw new IllegalStateException("Null request object");
}
return request.getMethod().getMethodString();
}
代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: javaee/grizzly
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: javaee/grizzly
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public String getMethod() {
if (request == null) {
throw new IllegalStateException("Null request object");
}
return request.getMethod().getMethodString();
}
代码示例来源:origin: javaee/grizzly
@Override
StringBuilder format(StringBuilder builder, Request request, Response response, Date timeStamp, long responseNanos) {
final Method method = request.getMethod();
return builder.append(method == null ? "-" : method.toString());
}
}
内容来源于网络,如有侵权,请联系作者删除!