Tabnine Logo
HttpsMapper.getSchemeOf
Code IndexAdd Tabnine to your IDE (free)

How to use
getSchemeOf
method
in
org.apache.wicket.protocol.https.HttpsMapper

Best Java code snippets using org.apache.wicket.protocol.https.HttpsMapper.getSchemeOf (Showing top 5 results out of 315)

origin: org.wicketstuff/wicketstuff-portlet

  @Override
  protected Scheme getDesiredSchemeFor(IRequestHandler handler) {
    Request request = RequestCycle.get().getRequest();
    return super.getSchemeOf(request);
  }
});
origin: org.apache.wicket/wicket-core

@Override
public final 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;
}
origin: apache/wicket

@Override
public final 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;
}
origin: apache/wicket

/**
 * Creates a url for the handler. Modifies it with the correct {@link Scheme} if necessary.
 * 
 * @param handler
 * @param request
 * @return url
 */
final Url mapHandler(IRequestHandler handler, Request request)
{
  Url url = delegate.mapHandler(handler);
  Scheme desired = getDesiredSchemeFor(handler);
  Scheme current = getSchemeOf(request);
  if (!desired.isCompatibleWith(current))
  {
    // the generated url does not have the correct scheme, set it (which in turn will cause
    // the url to be rendered in its full representation)
    url.setProtocol(desired.urlName());
    url.setPort(desired.getPort(config));
  }
  return url;
}
origin: org.apache.wicket/wicket-core

/**
 * Creates a url for the handler. Modifies it with the correct {@link Scheme} if necessary.
 * 
 * @param handler
 * @param request
 * @return url
 */
final Url mapHandler(IRequestHandler handler, Request request)
{
  Url url = delegate.mapHandler(handler);
  Scheme desired = getDesiredSchemeFor(handler);
  Scheme current = getSchemeOf(request);
  if (!desired.isCompatibleWith(current))
  {
    // the generated url does not have the correct scheme, set it (which in turn will cause
    // the url to be rendered in its full representation)
    url.setProtocol(desired.urlName());
    url.setPort(desired.getPort(config));
  }
  return url;
}
org.apache.wicket.protocol.httpsHttpsMappergetSchemeOf

Javadoc

Determines the Scheme of the request

Popular methods of HttpsMapper

  • <init>
    Constructor
  • getDesiredSchemeFor
    Figures out which Scheme should be used to access the request handler
  • createRedirectHandler
    Creates the IRequestHandler that will be responsible for the redirect
  • createRedirectUrl
    Constructs a redirect url that should switch the user to the specified scheme
  • hasSecureAnnotation
    Checks if the specified type has the RequireHttps annotation
  • mapHandler
    Creates a url for the handler. Modifies it with the correct Scheme if necessary.

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSystemService (Context)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JFrame (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now