本文整理了Java中org.eclipse.jetty.server.Request.getBaseRequest
方法的一些代码示例,展示了Request.getBaseRequest
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getBaseRequest
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:getBaseRequest
[英]Obtain the base Request instance of a ServletRequest, by coercion, unwrapping or special attribute.
[中]通过强制、展开或特殊属性获取ServletRequest的基本请求实例。
代码示例来源:origin: jphp-group/jphp
@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 __invoke(PHttpServerRequest request, PHttpServerResponse response) throws IOException, ServletException {
Request baseRequest = Request.getBaseRequest(request.getRequest());
gzipHandler.handle(request.getRequest().getRequestURI(), baseRequest, request.getRequest(), response.getResponse());
}
}
代码示例来源:origin: org.eclipse.jetty/jetty-security
Request base_request = Request.getBaseRequest(request);
base_request.setMethod(method);
代码示例来源:origin: org.eclipse.jetty/jetty-security
public UserIdentity login(String username, Object password, ServletRequest servletRequest)
{
UserIdentity user = _loginService.login(username, password, servletRequest);
if (user != null)
{
Request request = Request.getBaseRequest(servletRequest);
renewSession(request, request == null ? null : request.getResponse());
return user;
}
return null;
}
代码示例来源:origin: jphp-group/jphp
resourceHandler.setEtags(etags());
Request baseRequest = Request.getBaseRequest(request.getRequest());
代码示例来源:origin: org.eclipse.jetty/jetty-security
Request base_request = Request.getBaseRequest(request);
Response base_response = base_request.getResponse();
代码示例来源:origin: org.keycloak/keycloak-jetty94-adapter
@Override
protected Request resolveRequest(ServletRequest req) {
return Request.getBaseRequest(req);
}
代码示例来源:origin: org.keycloak/spring-boot-container-bundle
@Override
protected Request resolveRequest(ServletRequest req) {
return Request.getBaseRequest(req);
}
代码示例来源:origin: org.keycloak/keycloak-saml-jetty93-adapter
@Override
protected Request resolveRequest(ServletRequest req) {
return Request.getBaseRequest(req);
}
代码示例来源:origin: org.keycloak/keycloak-saml-jetty94-adapter
@Override
protected Request resolveRequest(ServletRequest req) {
return Request.getBaseRequest(req);
}
代码示例来源:origin: org.eclipse.jetty/jetty-security
return true;
HttpConfiguration httpConfig = Request.getBaseRequest(request).getHttpChannel().getHttpConfiguration();
代码示例来源:origin: ahus1/keycloak-dropwizard-integration
protected JettyRequestAuthenticator createRequestAuthenticator(HttpServletRequest request, JaxrsHttpFacade facade,
KeycloakDeployment deployment,
AdapterTokenStore tokenStore) {
Request r = Request.getBaseRequest(request);
return new JettyRequestAuthenticator(facade, deployment, tokenStore, -1, r);
}
代码示例来源:origin: OpenNMS/opennms
@Override
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws ServletException, IOException {
final Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication != null) {
final Request jettyReq = Request.getBaseRequest(req);
if (jettyReq == null) {
LOG.warn("Failed to find org.eclipse.jetty.server.Request from javax.servlet.ServletRequest. No identity will be set.");
} else {
jettyReq.setAuthentication(new AuthenticationUserStub(authentication));
}
}
chain.doFilter(req, res);
}
代码示例来源:origin: ahus1/keycloak-dropwizard-integration
public static AdapterTokenStore getTokenStore(HttpServletRequest request, HttpFacade facade,
KeycloakDeployment resolvedDeployment) {
AdapterTokenStore store = (AdapterTokenStore) request.getAttribute(TOKEN_STORE_NOTE);
if (store != null) {
return store;
}
Request r = Request.getBaseRequest(request);
if (resolvedDeployment.getTokenStore() == TokenStore.SESSION) {
store = new JettySessionTokenStore(r, resolvedDeployment, new JettyAdapterSessionStore(r));
} else {
store = new JettyCookieTokenStore(r, facade, resolvedDeployment);
}
request.setAttribute(TOKEN_STORE_NOTE, store);
return store;
}
代码示例来源:origin: jenkinsci/winstone
protected void writeErrorPageBody(HttpServletRequest request, Writer writer, int code, String message, boolean showStacks)
throws IOException
{
String uri= request.getRequestURI();
writeErrorPageMessage(request,writer,code,message,uri);
if (showStacks)
writeErrorPageStacks(request,writer);
Request.getBaseRequest(request).getHttpChannel().getHttpConfiguration()
.writePoweredBy(writer,"<hr>","<hr/>\n");
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
protected void writeErrorPageBody(HttpServletRequest request, Writer writer, int code, String message, boolean showStacks)
throws IOException
{
String uri= request.getRequestURI();
writeErrorPageMessage(request,writer,code,message,uri);
if (showStacks)
writeErrorPageStacks(request,writer);
Request.getBaseRequest(request).getHttpChannel().getHttpConfiguration()
.writePoweredBy(writer,"<hr>","<hr/>\n");
}
代码示例来源:origin: fstab/http2-examples
private void push(HttpServletRequest req) {
Request baseRequest = Request.getBaseRequest(req);
if (baseRequest.isPushSupported()) {
baseRequest
.getPushBuilder()
.method("GET")
.path("/data")
.push();
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
@Override
public void requestDestroyed(ServletRequestEvent sre)
{
String cname=findContextName(sre.getServletContext());
HttpServletRequest r = (HttpServletRequest)sre.getServletRequest();
String rname=findRequestName(r);
DispatcherType d = r.getDispatcherType();
if (sre.getServletRequest().isAsyncStarted())
{
sre.getServletRequest().getAsyncContext().addListener(_asyncListener);
log("<< %s ctx=%s r=%s async=true",d,cname,rname);
}
else
{
Request br=Request.getBaseRequest(r);
String headers=_showHeaders?("\n"+br.getResponse().getHttpFields().toString()):"";
log("<< %s ctx=%s r=%s async=false %d%s",d,cname,rname,Request.getBaseRequest(r).getResponse().getStatus(),headers);
}
}
};
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
@Override
public void onComplete(AsyncEvent event) throws IOException
{
AsyncContextEvent ace=(AsyncContextEvent)event;
String cname=findContextName(ace.getServletContext());
String rname=findRequestName(ace.getAsyncContext().getRequest());
Request br=Request.getBaseRequest(ace.getAsyncContext().getRequest());
Response response = br.getResponse();
String headers=_showHeaders?("\n"+response.getHttpFields().toString()):"";
log("! ctx=%s r=%s onComplete %s %d%s",cname,rname,ace.getHttpChannelState(),response.getStatus(),headers);
}
};
代码示例来源:origin: jenkinsci/winstone
@Override
public void onComplete(AsyncEvent event) throws IOException
{
AsyncContextEvent ace=(AsyncContextEvent)event;
String cname=findContextName(ace.getServletContext());
String rname=findRequestName(ace.getAsyncContext().getRequest());
Request br=Request.getBaseRequest(ace.getAsyncContext().getRequest());
Response response = br.getResponse();
String headers=_showHeaders?("\n"+response.getHttpFields().toString()):"";
log("! ctx=%s r=%s onComplete %s %d%s",cname,rname,ace.getHttpChannelState(),response.getStatus(),headers);
}
};
内容来源于网络,如有侵权,请联系作者删除!