com.google.gwt.core.client.GWT.getPermutationStrongName()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(8.8k)|赞(0)|评价(0)|浏览(146)

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

GWT.getPermutationStrongName介绍

[英]Returns the permutation's strong name. This can be used to distinguish between different permutations of the same module. In Development Mode, this method will return #HOSTED_MODE_PERMUTATION_STRONG_NAME.
[中]返回置换的强名称。这可用于区分同一模块的不同排列。在开发模式下,此方法将返回#托管(HOSTED)模式(PERMUTATION)强(STRONG)名称。

代码示例

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

/**
  * The URL to retrieve a fragment of code from. NOTE: this function is not
  * stable. It tweaks the URL with each call so that browsers are not tempted
  * to cache a download failure.
  */
 private String getUrl(int fragment) {
  return GWT.getModuleBaseURL() + getDeferredJavaScriptDirectory()
    + GWT.getPermutationStrongName() + "/" + fragment + ".cache.js?serial="
    + getSerial(fragment);
 }
}

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

/**
 * Called by {@link #finish()} prior to returning the RequestBuilder to the
 * caller.
 * <p>
 * The default implementation sets the {@value #STRONG_NAME_HEADER} header to
 * the value returned by {@link GWT#getPermutationStrongName()}.
 * 
 * @param rb The RequestBuilder that is currently being configured
 */
protected void doFinish(RequestBuilder rb) {
 rb.setHeader(STRONG_NAME_HEADER, GWT.getPermutationStrongName());
 rb.setHeader(MODULE_BASE_HEADER, GWT.getModuleBaseURL());
}

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

/**
 * Override to change the headers sent in the HTTP request.
 * 
 * @param builder a {@link RequestBuilder} instance
 */
protected void configureRequestBuilder(RequestBuilder builder) {
 builder.setHeader("Content-Type", RequestFactory.JSON_CONTENT_TYPE_UTF8);
 builder.setHeader("pageurl", Location.getHref());
 builder.setHeader(STRONG_NAME_HEADER, GWT.getPermutationStrongName());
}

代码示例来源:origin: com.progressoft.brix.domino.impl/domino-gwt

private SerializableLogRecord asSerializableLogRecord(LogRecord record) {
  SerializableLogRecord serializableLogRecord = new SerializableLogRecord();
  serializableLogRecord.level = record.getLevel().toString();
  serializableLogRecord.millis = record.getMillis();
  serializableLogRecord.message = record.getMessage();
  serializableLogRecord.loggerName = record.getLoggerName();
  serializableLogRecord.permutationStrongName = GWT.getPermutationStrongName();
  serializableLogRecord.thrown = serializableThrowable(unwrap(record.getThrown()));
  return serializableLogRecord;
}

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

/**
 * Visible for testing.
 */
static String buildPayload(Throwable t) {
 StringBuilder sb = new StringBuilder();
 sb.append("{\"strongName\" : ");
 sb.append(JsonUtils.escapeValue(GWT.getPermutationStrongName()));
 sb.append(",\"message\" : ");
 sb.append(JsonUtils.escapeValue(t.getMessage()));
 sb.append(",\"stackTrace\" : [");
 boolean needsComma = false;
 for (StackTraceElement e : t.getStackTrace()) {
  if (needsComma) {
   sb.append(",");
  } else {
   needsComma = true;
  }
  sb.append(JsonUtils.escapeValue(e.getMethodName()));
 }
 sb.append("]}");
 return sb.toString();
}

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

/**
  * The URL to retrieve a fragment of code from. NOTE: this function is not
  * stable. It tweaks the URL with each call so that browsers are not tempted
  * to cache a download failure.
  */
 private String getUrl(int fragment) {
  return GWT.getModuleBaseURL() + getDeferredJavaScriptDirectory()
    + GWT.getPermutationStrongName() + "/" + fragment + ".cache.js?serial="
    + getSerial(fragment);
 }
}

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

/**
  * The URL to retrieve a fragment of code from. NOTE: this function is not
  * stable. It tweaks the URL with each call so that browsers are not tempted
  * to cache a download failure.
  */
 private String getUrl(int fragment) {
  return GWT.getModuleBaseURL() + getDeferredJavaScriptDirectory()
    + GWT.getPermutationStrongName() + "/" + fragment + ".cache.js?serial="
    + getSerial(fragment);
 }
}

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

/**
 * Called by {@link #finish()} prior to returning the RequestBuilder to the
 * caller.
 * <p>
 * The default implementation sets the {@value #STRONG_NAME_HEADER} header to
 * the value returned by {@link GWT#getPermutationStrongName()}.
 * 
 * @param rb The RequestBuilder that is currently being configured
 */
protected void doFinish(RequestBuilder rb) {
 rb.setHeader(STRONG_NAME_HEADER, GWT.getPermutationStrongName());
 rb.setHeader(MODULE_BASE_HEADER, GWT.getModuleBaseURL());
}

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

/**
 * Called by {@link #finish()} prior to returning the RequestBuilder to the
 * caller.
 * <p>
 * The default implementation sets the {@value #STRONG_NAME_HEADER} header to
 * the value returned by {@link GWT#getPermutationStrongName()}.
 * 
 * @param rb The RequestBuilder that is currently being configured
 */
protected void doFinish(RequestBuilder rb) {
 rb.setHeader(STRONG_NAME_HEADER, GWT.getPermutationStrongName());
 rb.setHeader(MODULE_BASE_HEADER, GWT.getModuleBaseURL());
}

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

/**
 * Override to change the headers sent in the HTTP request.
 * 
 * @param builder a {@link RequestBuilder} instance
 */
protected void configureRequestBuilder(RequestBuilder builder) {
 builder.setHeader("Content-Type", RequestFactory.JSON_CONTENT_TYPE_UTF8);
 builder.setHeader("pageurl", Location.getHref());
 builder.setHeader(STRONG_NAME_HEADER, GWT.getPermutationStrongName());
}

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

/**
 * Override to change the headers sent in the HTTP request.
 * 
 * @param builder a {@link RequestBuilder} instance
 */
protected void configureRequestBuilder(RequestBuilder builder) {
 builder.setHeader("Content-Type", RequestFactory.JSON_CONTENT_TYPE_UTF8);
 builder.setHeader("pageurl", Location.getHref());
 builder.setHeader(STRONG_NAME_HEADER, GWT.getPermutationStrongName());
}

代码示例来源:origin: com.googlecode.gwt-measure/gwt-measure

private void prepareCommonAttributes(Throwable throwable, IncidentReport report) {
  report.setTimestamp(TimeUtils.current());
  report.setMessage(JsonUtils.escapeValue(throwable.getMessage()));
  report.setStrongName(JsonUtils.escapeValue(GWT.getPermutationStrongName()));
  report.setUrl(Window.Location.getHref());
  int length = throwable.getStackTrace().length;
  String[] stackTrace = new String[length];
  StackTraceElement[] stackTrace1 = throwable.getStackTrace();
  for (int i = 0, stackTrace1Length = stackTrace1.length; i < stackTrace1Length; i++) {
    StackTraceElement element = stackTrace1[i];
    stackTrace[i] = JsonUtils.escapeValue(element.getMethodName());
  }
  report.setStackTrace(stackTrace);
}

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

protected Dictionary<String, String> normalizeHeaders(StringDictionary<String> headers) {
 if (headers == null) {
  headers = X_Collect.newDictionary();
 }
 if (!headers.hasKey("X-Gwt-Version")) {
  headers.setValue("X-Gwt-Version", GWT.getPermutationStrongName());
 }
 if (!headers.hasKey("X-Gwt-Module")) {
  headers.setValue("X-Gwt-Module", GWT.getModuleName());
 }
 return headers;
}

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

protected String serializeRPC(Object message) throws SerializationException {
    try {
      Serializer serializer = getRPCSerializer();
      ClientSerializationStreamWriter writer = new ClientSerializationStreamWriter(serializer, GWT.getModuleBaseURL(), GWT.getPermutationStrongName());
      writer.prepareToWrite();
      writer.writeObject(message);
      return writer.toString();
    } catch (RuntimeException e) {
      throw new SerializationException(e);
    }
}
protected String serializeJSON(Object message) throws SerializationException {

代码示例来源:origin: org.atmosphere.extensions/atmosphere-gwt20-client

@Override
public String serialize(Object message) throws SerializationException {
  try {
    Serializer serializer = getRPCSerializer();
    ClientSerializationStreamWriter writer = new ClientSerializationStreamWriter(serializer, GWT.getModuleBaseURL(), GWT.getPermutationStrongName());
    writer.prepareToWrite();
    writer.writeObject(message);
    return writer.toString();
  } catch (RuntimeException e) {
    throw new SerializationException(e);
  }
}

代码示例来源:origin: org.atmosphere/atmosphere-gwt-client

protected String serializeRPC(Object message) throws SerializationException {
    try {
      Serializer serializer = getRPCSerializer();
      ClientSerializationStreamWriter writer = new ClientSerializationStreamWriter(serializer, GWT.getModuleBaseURL(), GWT.getPermutationStrongName());
      writer.prepareToWrite();
      writer.writeObject(message);
      return writer.toString();
    } catch (RuntimeException e) {
      throw new SerializationException(e);
    }
}
protected String serializeJSON(Object message) throws SerializationException {

代码示例来源:origin: Atmosphere/atmosphere-extensions

@Override
public String serialize(Object message) throws SerializationException {
  try {
    Serializer serializer = getRPCSerializer();
    ClientSerializationStreamWriter writer = new ClientSerializationStreamWriter(serializer, GWT.getModuleBaseURL(), GWT.getPermutationStrongName());
    writer.prepareToWrite();
    writer.writeObject(message);
    return writer.toString();
  } catch (RuntimeException e) {
    throw new SerializationException(e);
  }
}

代码示例来源:origin: bedatadriven/activityinfo

Log.info("Application Permutation: " + GWT.getPermutationStrongName());

相关文章