org.apache.wicket.protocol.http.WebApplication.getRequestCycleProcessor()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中org.apache.wicket.protocol.http.WebApplication.getRequestCycleProcessor()方法的一些代码示例,展示了WebApplication.getRequestCycleProcessor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebApplication.getRequestCycleProcessor()方法的具体详情如下:
包路径:org.apache.wicket.protocol.http.WebApplication
类名称:WebApplication
方法名:getRequestCycleProcessor

WebApplication.getRequestCycleProcessor介绍

[英]Gets the default request cycle processor (with lazy initialization). This is the IRequestCycleProcessor that will be used by RequestCycles when custom implementations of the request cycle do not provide their own customized versions.
[中]获取默认的请求周期处理器(具有延迟初始化)。这是当请求周期的自定义实现没有提供自己的自定义版本时,RequestCycles将使用的iRequestCycle处理器。

代码示例

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * By default returns the WebApplication's default request cycle processor. Typically, you don't
 * override this method but instead override {@link WebApplication#newRequestCycleProcessor()}.
 * <p>
 * <strong>if you decide to override this method to provide a custom processor per request
 * cycle, any mounts done via WebApplication will not work and and
 * {@link #onRuntimeException(Page, RuntimeException)} is not called unless you deliberately put
 * effort in it to make it work.</strong>
 * </p>
 * 
 * @see org.apache.wicket.RequestCycle#getProcessor()
 */
public IRequestCycleProcessor getProcessor()
{
  return ((WebApplication)getApplication()).getRequestCycleProcessor();
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * By default returns the WebApplication's default request cycle processor. Typically, you don't
 * override this method but instead override {@link WebApplication#newRequestCycleProcessor()}.
 * <p>
 * <strong>if you decide to override this method to provide a custom processor per request
 * cycle, any mounts done via WebApplication will not work and and
 * {@link #onRuntimeException(Page, RuntimeException)} is not called unless you deliberately put
 * effort in it to make it work.</strong>
 * </p>
 * 
 * @see org.apache.wicket.RequestCycle#getProcessor()
 */
@Override
public IRequestCycleProcessor getProcessor()
{
  return ((WebApplication)getApplication()).getRequestCycleProcessor();
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Unmounts whatever encoder is mounted at a given path.
 * 
 * @param path
 *            the path of the encoder to unmount
 */
public final void unmount(String path)
{
  getRequestCycleProcessor().getRequestCodingStrategy().unmount(path);
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Mounts an encoder at the given path.
 * 
 * @param encoder
 *            the encoder that will be used for this mount
 */
public final void mount(IRequestTargetUrlCodingStrategy encoder)
{
  if (encoder == null)
  {
    throw new IllegalArgumentException("Encoder must be not null");
  }
  getRequestCycleProcessor().getRequestCodingStrategy().mount(encoder);
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Mounts an encoder at the given path.
 * 
 * @param encoder
 *            the encoder that will be used for this mount
 */
public final void mount(IRequestTargetUrlCodingStrategy encoder)
{
  if (encoder == null)
  {
    throw new IllegalArgumentException("Encoder must be not null");
  }
  getRequestCycleProcessor().getRequestCodingStrategy().mount(encoder);
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Partly unmounts/ignores a path that normally would map to another mount path. Like
 * mount("/mypage", MyPage.class); and then "/mypage/arealdir" should be ignored. This can be
 * done by calling unMount("/mypage/arealdir");
 * 
 * @param path
 *            the path that should be ignored.
 */
public final void addIgnoreMountPath(String path)
{
  getRequestCycleProcessor().getRequestCodingStrategy().addIgnoreMountPath(path);
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Unmounts whatever encoder is mounted at a given path.
 * 
 * @param path
 *            the path of the encoder to unmount
 */
public final void unmount(String path)
{
  getRequestCycleProcessor().getRequestCodingStrategy().unmount(path);
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Is this a Wicket request?
 * 
 * @param relativePath
 *            The relativePath
 * @return True if this is a Wicket request
 */
private boolean isWicketRequest(String relativePath)
{
  // default location, like
  // /wicket-examples/forminput/?wicket:interface=:0::::
  // the relative path here is empty (wicket-examples is the web
  // application and the filter is mapped to /forminput/*
  if (relativePath.equals(""))
  {
    return true;
  }
  // Resources
  if (relativePath.startsWith(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX))
  {
    return true;
  }
  // Mounted page
  return webApplication.getRequestCycleProcessor()
    .getRequestCodingStrategy()
    .urlCodingStrategyForPath(relativePath) != null;
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Is this a Wicket request?
 * 
 * @param relativePath
 *            The relativePath
 * @return True if this is a Wicket request
 */
private boolean isWicketRequest(String relativePath)
{
  // relativePath is emtpy - thus it's the default location, like
  // /wicket-examples/forminput/?wicket:interface=:0::::
  // the relative path here is empty (wicket-examples is the web
  // application and the filter is mapped to /forminput/*
  if (relativePath.equals(""))
  {
    return true;
  }
  // Resources
  if (relativePath.startsWith(WebRequestCodingStrategy.RESOURCES_PATH_PREFIX))
  {
    return true;
  }
  // Mounted page
  return webApplication.getRequestCycleProcessor()
    .getRequestCodingStrategy()
    .urlCodingStrategyForPath(relativePath) != null;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-xinha-integration

@Override
  protected Map<String, Object> getVariables() {
    final Page page = getPluginContext().getService(Home.class.getName(), Home.class);
    String url = WebApplication.get().getRequestCycleProcessor().getRequestCodingStrategy()
        .rewriteStaticRelativeUrl("xinha/xinha/");
    String lang = page.getLocale().getLanguage();
    String skin = configuration.getSkin();
    Map<String, Object> map = super.getVariables();
    map.put("editorUrl", url);
    map.put("editorLang", lang);
    map.put("editorSkin", skin);
    return map;
  }
};

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

if (!sharedResource)
  sharedResourceMount = webApplication.getRequestCycleProcessor()
    .getRequestCodingStrategy()
    .urlCodingStrategyForPath(pathInfo);

相关文章

微信公众号

最新文章

更多

WebApplication类方法