本文整理了Java中org.eclipse.jetty.server.Request.isHandled
方法的一些代码示例,展示了Request.isHandled
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.isHandled
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:isHandled
暂无
代码示例来源:origin: jitsi/jitsi-videobridge
if (baseRequest.isHandled())
return; // The super implementation has handled the request.
代码示例来源:origin: org.eclipse.jetty/jetty-security
if (!baseRequest.isHandled())
if (!baseRequest.isHandled())
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-websocket
@Override
public void handle(final String target,
final Request baseRequest,
final HttpServletRequest request,
final HttpServletResponse response)
throws IOException, ServletException
{
if (response.isCommitted() || baseRequest.isHandled())
{
return;
}
baseRequest.setHandled(true);
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
}
});
代码示例来源:origin: com.github.searls/jasmine-maven-plugin
private boolean weCanHandleIt(Request baseRequest, Resource resource) {
return !baseRequest.isHandled() && resource != null && resource.exists();
}
代码示例来源:origin: com.azaptree/azaptree-http-service
@Override
public void handle(final String target, final Request baseRequest, final HttpServletRequest request, final HttpServletResponse response)
throws IOException, ServletException {
preProcess(target, baseRequest, request, response);
if (baseRequest.isHandled()) {
log.debug("request was handled by preProcess()");
return;
}
executeContinuation(target, baseRequest, request, response);
baseRequest.setHandled(true);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
if (isStarted())
{
String returned = _rules.matchAndApply(target, request, response);
target = (returned == null) ? target : returned;
if (!baseRequest.isHandled())
super.handle(target, baseRequest, request, response);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
if (isStarted())
{
String returned = _rules.matchAndApply(target, request, response);
target = (returned == null) ? target : returned;
if (!baseRequest.isHandled())
super.handle(target, baseRequest, request, response);
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
if (isStarted())
{
String returned = _rules.matchAndApply(target, request, response);
target = (returned == null) ? target : returned;
if (!baseRequest.isHandled())
super.handle(target, baseRequest, request, response);
}
}
代码示例来源:origin: net.unit8.enkan/enkan-component-jetty
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
if (baseRequest.isHandled())
return;
HttpRequest httpRequest = ServletUtils.buildRequest(request);
try {
HttpResponse httpResponse = application.handle(httpRequest);
ServletUtils.updateServletResponse(response, httpResponse);
} catch (Exception e) {
LOG.error("Unhandled exception", e);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
} finally {
baseRequest.setHandled(true);
}
}
}
代码示例来源:origin: kawasima/enkan
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
if (baseRequest.isHandled())
return;
HttpRequest httpRequest = ServletUtils.buildRequest(request);
try {
HttpResponse httpResponse = application.handle(httpRequest);
ServletUtils.updateServletResponse(response, httpResponse);
} catch (Exception e) {
LOG.error("Unhandled exception", e);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
} finally {
baseRequest.setHandled(true);
}
}
}
代码示例来源:origin: org.eclipse.jetty/jetty-rewrite
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
if (isStarted())
{
if (_dispatchTypes.contains(baseRequest.getDispatcherType()))
{
String returned = _rules.matchAndApply(target, request, response);
target = (returned == null) ? target : returned;
}
if (!baseRequest.isHandled())
super.handle(target, baseRequest, request, response);
}
}
代码示例来源:origin: com.github.searls/jasmine-maven-plugin
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
if (baseRequest.isHandled()) {
return;
}
String resourcePath = getResourcePath(target);
InputStream resource = findResource(resourcePath);
if (resource != null) {
String javascript = IOUtils.toString(resource, "UTF-8");
if ("/jasmine/boot.js".equals(target)) {
javascript = javascript.replaceAll("window.onload =", "jasmine.boot =");
}
setHeaders(response, resourcePath, javascript);
writeResponse(response, javascript);
baseRequest.setHandled(true);
}
}
代码示例来源:origin: com.nesscomputing.components/ness-httpserver
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
if (baseRequest.isHandled()) {
return;
}
response.setStatus(403);
response.setContentType("text/plain");
response.setCharacterEncoding("UTF-8");
response.getWriter().write("Verboten!");
baseRequest.setHandled(true);
}
}
代码示例来源:origin: searls/jasmine-maven-plugin
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
if (baseRequest.isHandled()) {
return;
}
String resourcePath = getResourcePath(target);
InputStream resource = findResource(resourcePath);
if (resource != null) {
String javascript = IOUtils.toString(resource, "UTF-8");
if ("/jasmine-core/boot.js".equals(target)) {
javascript = javascript.replaceAll("window.onload =", "jasmine.boot =");
}
setHeaders(response, resourcePath, javascript);
writeResponse(response, javascript);
baseRequest.setHandled(true);
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
/**
* @see Handler#handle(String, Request, HttpServletRequest, HttpServletResponse)
*/
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
Handler[] handlers = getHandlers();
if (handlers!=null && isStarted())
{
for (int i=0;i<handlers.length;i++)
{
handlers[i].handle(target,baseRequest, request, response);
if ( baseRequest.isHandled())
return;
}
}
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
final String target=connection.getRequest().getPathInfo();
final Request request=connection.getRequest();
final Response response=connection.getResponse();
if (LOG.isDebugEnabled())
{
LOG.debug("REQUEST "+target+" on "+connection);
handle(target, request, request, response);
LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
}
else
handle(target, request, request, response);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
final String target=connection.getRequest().getPathInfo();
final Request request=connection.getRequest();
final Response response=connection.getResponse();
if (LOG.isDebugEnabled())
{
LOG.debug("REQUEST "+target+" on "+connection);
handle(target, request, request, response);
LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
}
else
handle(target, request, request, response);
}
代码示例来源:origin: org.eclipse.jetty/server
public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
final String target=connection.getRequest().getPathInfo();
final Request request=connection.getRequest();
final Response response=connection.getResponse();
if (LOG.isDebugEnabled())
{
LOG.debug("REQUEST "+target+" on "+connection);
handle(target, request, request, response);
LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
}
else
handle(target, request, request, response);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
final String target=connection.getRequest().getPathInfo();
final Request request=connection.getRequest();
final Response response=connection.getResponse();
if (LOG.isDebugEnabled())
{
LOG.debug("REQUEST "+target+" on "+connection);
handle(target, request, request, response);
LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
}
else
handle(target, request, request, response);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
final String target=connection.getRequest().getPathInfo();
final Request request=connection.getRequest();
final Response response=connection.getResponse();
if (LOG.isDebugEnabled())
{
LOG.debug("REQUEST "+target+" on "+connection);
handle(target, request, request, response);
LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
}
else
handle(target, request, request, response);
}
内容来源于网络,如有侵权,请联系作者删除!