当前位置: 首页>>代码示例>>Java>>正文


Java VersionUtil类代码示例

本文整理汇总了Java中org.directwebremoting.util.VersionUtil的典型用法代码示例。如果您正苦于以下问题:Java VersionUtil类的具体用法?Java VersionUtil怎么用?Java VersionUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


VersionUtil类属于org.directwebremoting.util包,在下文中一共展示了VersionUtil类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: logStartup

import org.directwebremoting.util.VersionUtil; //导入依赖的package包/类
/**
 * Some logging so we have a good clue what we are working with.
 * @param config The servlet config
 */
public static void logStartup(ServletConfig config)
{
    log.info("DWR Version " + VersionUtil.getVersion() + " starting.");
    log.info("- Servlet Engine: " + config.getServletContext().getServerInfo());
    log.info("- Java Version:   " + System.getProperty("java.version"));
    log.info("- Java Vendor:    " + System.getProperty("java.vendor"));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:StartupUtil.java

示例2: getInsert

import org.directwebremoting.util.VersionUtil; //导入依赖的package包/类
/**
 * A simple test that the DWR is working. Used by the front page.
 * @return The text of the insert.html page
 * @throws IOException From {@link WebContext#forwardToString(String)}
 * @throws ServletException From {@link WebContext#forwardToString(String)}
 */
public String[] getInsert() throws ServletException, IOException
{
    return new String[]
    {
        WebContextFactory.get().forwardToString("/insert.html"),
        VersionUtil.getLabel(),
    };
}
 
开发者ID:directwebremoting,项目名称:dwr,代码行数:15,代码来源:Intro.java

示例3: logStartup

import org.directwebremoting.util.VersionUtil; //导入依赖的package包/类
/**
 * Some logging so we have a good clue what we are working with.
 * @param name The servlet name (so we can distinguish implementations)
 * @param config The servlet config
 */
public static void logStartup(String name, ServletConfig config)
{
    ServletContext servletContext = config.getServletContext();

    // SERVLET24: Use getContextPath directly in 2.5
    String contextPath = LocalUtil.getProperty(servletContext, "ContextPath", String.class);
    contextPath = contextPath == null ? "" :  " at " + contextPath;

    Loggers.STARTUP.info("Starting: " + name + " v" + VersionUtil.getLabel() + " on " + servletContext.getServerInfo() + " / JDK " + System.getProperty("java.version") + " from " + System.getProperty("java.vendor") + contextPath);
}
 
开发者ID:directwebremoting,项目名称:dwr,代码行数:16,代码来源:StartupUtil.java

示例4: getVersion

import org.directwebremoting.util.VersionUtil; //导入依赖的package包/类
public String getVersion()
{
    return VersionUtil.getVersion();
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:5,代码来源:DefaultWebContext.java

示例5: getProviderVersion

import org.directwebremoting.util.VersionUtil; //导入依赖的package包/类
public String getProviderVersion() throws JMSException
{
	return VersionUtil.getLabel();
}
 
开发者ID:directwebremoting,项目名称:dwr,代码行数:5,代码来源:DwrConnectionMetaData.java

示例6: getSearchReplacePairs

import org.directwebremoting.util.VersionUtil; //导入依赖的package包/类
@Override
protected Map<String, String> getSearchReplacePairs(String contextPath, String servletPath, String pathInfo)
{
    Map<String, String> replace = new HashMap<String, String>();

    // If we are dynamic then we might need to pre-configure some variables.
    boolean streaming = true;

    // If the maxWaitAfterWrite time is less than half a second then we
    // count ourselves to be not streaming, and use the simple XHR
    // connection method.
    if (maxWaitAfterWrite > -1 && maxWaitAfterWrite < 500)
    {
        streaming = false;
    }

    // If the ServerLoadMonitor says no streaming, then obviously ...
    if (!serverLoadMonitor.supportsStreaming())
    {
        streaming = false;
    }

    // Poll using XHR (to avoid IE clicking) if we close
    // the connection than 1sec after output happens.
    String useStreamingPoll = streaming ? "true" : "false";
    replace.put("${useStreamingPoll}", useStreamingPoll);

    // Setup paths
    replace.put("${contextPath}", contextPath);
    String contextServletPath = contextPath + servletPath;
    String pathToDwrServlet = remoter.getPathToDwrServlet(contextServletPath);
    replace.put("${pathToDwrServlet}", pathToDwrServlet);
    replace.put("${overridePath}", overridePath);
    replace.put("${overrideContextPath}", overrideContextPath);

    // Cookie config
    replace.put("${cookieAttributes}", cookieAttributes);

    // Does engine.js do GETs
    replace.put("${allowGetButMakeForgeryEasier}", String.valueOf(allowGetButMakeForgeryEasier));

    // What is the replacement field we use to tell engine.js what we are
    // using for script tag hack protection
    replace.put("${scriptTagProtection}", scriptTagProtection);

    // engine.js needs to know the URLs to send requests to:
    replace.put("${plainCallHandlerUrl}", plainCallHandlerUrl);
    replace.put("${plainPollHandlerUrl}", plainPollHandlerUrl);
    replace.put("${htmlCallHandlerUrl}", htmlCallHandlerUrl);
    replace.put("${htmlPollHandlerUrl}", htmlPollHandlerUrl);

    // Do we start off with everything in Sjax mode?
    replace.put("${defaultToAsync}", String.valueOf(defaultToAsync));

    // Version numbers so clients can sort out what they're up against
    replace.put("${versionMajor}", String.valueOf(VersionUtil.getMajor()));
    replace.put("${versionMinor}", String.valueOf(VersionUtil.getMinor()));
    replace.put("${versionRevision}", String.valueOf(VersionUtil.getRevision()));
    replace.put("${versionBuild}", String.valueOf(VersionUtil.getBuild()));
    replace.put("${versionTitle}", String.valueOf(VersionUtil.getTitle()));
    replace.put("${versionLabel}", String.valueOf(VersionUtil.getLabel()));

    replace.put("${initCode}", scriptSessionManager.getInitCode());

    replace.put("${debug}", String.valueOf(debug));

    return replace;
}
 
开发者ID:directwebremoting,项目名称:dwr,代码行数:69,代码来源:BaseEngineHandler.java

示例7: getVersion

import org.directwebremoting.util.VersionUtil; //导入依赖的package包/类
public String getVersion()
{
    return VersionUtil.getLabel();
}
 
开发者ID:directwebremoting,项目名称:dwr,代码行数:5,代码来源:DefaultServerContext.java


注:本文中的org.directwebremoting.util.VersionUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。