@Override public IRequestHandler mapRequest(final Request request) { Url url = decryptUrl(request, request.getUrl()); if (url == null) { return null; } return wrappedMapper.mapRequest(request.cloneWithUrl(url)); }
@Override public IRequestHandler mapRequest(Request request) { IRequestHandler handler = delegate.mapRequest(request); Scheme desired = getDesiredSchemeFor(handler); Scheme current = getSchemeOf(request); if (!desired.isCompatibleWith(current)) { // we are currently on the wrong scheme for this handler // construct a url for the handler on the correct scheme String url = createRedirectUrl(handler, request, desired); // replace handler with one that will redirect to the created url handler = createRedirectHandler(url); } return handler; }
/** * Resolves current request to a {@link IRequestHandler}. * * @return RequestHandler instance */ protected IRequestHandler resolveRequestHandler() { return requestMapper.mapRequest(request); }