com.google.gwt.user.server.rpc.RemoteServiceServlet.doGetSerializationPolicy()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(74)

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

RemoteServiceServlet.doGetSerializationPolicy介绍

[英]Loads the SerializationPolicy for given module base URL and strong name. Returns the policy if successful or null if not found. Due to caching, this method will only be called once for each combination of moduleBaseURL and strongName.

The default implementation loads serialization policies stored as servlet resources in the same ServletContext as this servlet.

Override this method to load the SerializationPolicy using an alternative approach.
[中]加载给定模块基URL和强名称的序列化策略。如果成功,则返回策略;如果未找到,则返回null。由于缓存的原因,对于moduleBaseURL和strongName的每个组合,此方法只调用一次。
默认实现将序列化策略作为servlet资源存储在与此servlet相同的ServletContext中。
重写此方法以使用替代方法加载SerializationPolicy。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

serializationPolicy = doGetSerializationPolicy(getThreadLocalRequest(),
  moduleBaseURL, strongName);

代码示例来源:origin: net.sf.gwt-widget/gwt-sl

@Override
protected SerializationPolicy doGetSerializationPolicy(
    HttpServletRequest request, String moduleBaseURL, String strongName) {
  String newModuleBaseURL = modulePathTranslation.computeModuleBaseURL(request, moduleBaseURL, strongName);
  return super.doGetSerializationPolicy(request, newModuleBaseURL, strongName);
}

代码示例来源:origin: sk.seges.acris/acris-server-components

@Override
protected SerializationPolicy doGetSerializationPolicy(
        HttpServletRequest request, String moduleBaseURL, String strongName) {
    String newModuleBaseURL = modulePathTranslation.computeModuleBaseURL(request, moduleBaseURL, strongName);
    return super.doGetSerializationPolicy(request, newModuleBaseURL, strongName);
}

代码示例来源:origin: org.nuxeo.ecm.webengine/nuxeo-webengine-gwt

return super.doGetSerializationPolicy(request, moduleBaseURL, strongName);
if (policyFile == null || !policyFile.isFile()) {
  log.warn("Could not find gwt serialization policy file for module " + moduleId + " [ " + filename + " ]");
  return super.doGetSerializationPolicy(request, moduleBaseURL, strongName);
} catch (IOException e) {
  log.error("Failed to read gwt serialization policy file for module " + moduleId + " [ " + filename + " ]", e);
  return super.doGetSerializationPolicy(request, moduleBaseURL, strongName);
} catch (ParseException e) {
  log.error("Failed to parse the policy file '" + policyFile + "'", e);
  return super.doGetSerializationPolicy(request, moduleBaseURL, strongName);
} finally {
  if (in != null) {

代码示例来源:origin: org.geomajas/geomajas-client-common-gwt-command

/**
 * Gets the {@link SerializationPolicy} for given module base URL and strong name if there is one.
 * 
 * Use {@link #setSerializationPolicyLocator(SerializationPolicyLocator)} to provide an alternative approach.
 * 
 * @param request the HTTP request being serviced
 * @param moduleBaseURL as specified in the incoming payload
 * @param strongName a strong name that uniquely identifies a serialization policy file
 * @return a {@link SerializationPolicy} for the given module base URL and strong name, or <code>null</code> if
 *         there is none
 */
protected SerializationPolicy doGetSerializationPolicy(HttpServletRequest request, String moduleBaseURL,
    String strongName) {
  if (getSerializationPolicyLocator() == null) {
    return super.doGetSerializationPolicy(request, moduleBaseURL, strongName);
  } else {
    return getSerializationPolicyLocator().loadPolicy(request, moduleBaseURL, strongName);
  }
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

serializationPolicy = doGetSerializationPolicy(getThreadLocalRequest(),
  moduleBaseURL, strongName);

代码示例来源:origin: net.wetheinter/gwt-user

serializationPolicy = doGetSerializationPolicy(getThreadLocalRequest(),
  moduleBaseURL, strongName);

相关文章

微信公众号

最新文章

更多