List of usage examples for org.apache.wicket.request.cycle RequestCycle processRequestAndDetach
public boolean processRequestAndDetach()
From source file:com.mastfrog.acteur.wicket.WicketActeur.java
License:Open Source License
@Inject WicketActeur(HttpEvent evt, Application application, PathFactory pf, Charset charset, WicketConfig config, ByteBufAllocator alloc, Settings settings, ReentrantScope scope) { RequestAdapter request = new RequestAdapter(evt, config.locale(), charset, settings); ResponseAdapter response = new ResponseAdapter(response(), charset, alloc, pf); try (QuietAutoCloseable closeScope = scope.enter(request, response, response())) { ThreadContext.setApplication(application); RequestCycle requestCycle = application.createRequestCycle(request, response); ThreadContext.setRequestCycle(requestCycle); boolean processed = requestCycle.processRequestAndDetach(); if (!processed) { reject();//from www .j a v a 2 s . co m } else { HttpResponseStatus status = response.status(); reply(status == null ? OK : status); } } finally { ThreadContext.detach(); } }