本文整理了Java中org.eclipse.jetty.server.Server.setErrorHandler()
方法的一些代码示例,展示了Server.setErrorHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.setErrorHandler()
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Server
类名称:Server
方法名:setErrorHandler
暂无
代码示例来源:origin: google/data-transfer-project
server.setErrorHandler(new JettyErrorHandler());
代码示例来源:origin: jphp-group/jphp
@Signature
public void setErrorHandler(Environment env, @Nullable Invoker invoker) {
if (invoker == null) {
server.setErrorHandler(null);
} else {
ErrorHandler errorHandler = new ErrorHandler();
server.setErrorHandler(new ErrorHandler() {
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException {
Throwable th = (Throwable)request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
invoker.callAny(th, new PHttpServerRequest(env, Request.getBaseRequest(request)), new PHttpServerResponse(env, response));
}
});
}
}
代码示例来源:origin: jphp-group/jphp
@Signature
public void runInBackground() throws Exception {
server.setErrorHandler(new ErrorHandler() {
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException {
super.handle(target, baseRequest, request, response);
}
});
HandlerList handlerList = new HandlerList();
for (Handler handler : filters.getHandlers()) {
handlerList.addHandler(handler);
}
for (Handler handler : handlers.getHandlers()) {
handlerList.addHandler(handler);
}
server.setHandler(handlerList);
server.start();
}
代码示例来源:origin: io.airlift/http-server
@PostConstruct
public void start()
throws Exception
{
server.start();
// clear the error handler registered by start()
if (!registerErrorHandler) {
server.setErrorHandler(null);
}
checkState(server.isStarted(), "server is not started");
}
代码示例来源:origin: com.proofpoint.platform/http-server
@AcceptRequests
public void start()
throws Exception
{
server.start();
// clear the error handler registered by start()
if (!registerErrorHandler) {
server.setErrorHandler(null);
}
checkState(server.isStarted(), "server is not started");
}
代码示例来源:origin: Valandur/Web-API
server.setErrorHandler(errHandler);
server.addBean(errHandler);
代码示例来源:origin: jenkinsci/winstone
_errorHandler=getBean(ErrorHandler.class);
if (_errorHandler==null)
setErrorHandler(new ErrorHandler());
if (_errorHandler instanceof ErrorHandler.ErrorPageMapper)
LOG.warn("ErrorPageMapper not supported for Server level Error Handling");
内容来源于网络,如有侵权,请联系作者删除!