當前位置: 首頁>>代碼示例>>Java>>正文


Java ServerLoadMonitor類代碼示例

本文整理匯總了Java中org.directwebremoting.extend.ServerLoadMonitor的典型用法代碼示例。如果您正苦於以下問題:Java ServerLoadMonitor類的具體用法?Java ServerLoadMonitor怎麽用?Java ServerLoadMonitor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ServerLoadMonitor類屬於org.directwebremoting.extend包,在下文中一共展示了ServerLoadMonitor類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: shutdownServerLoadMonitorsInContainerList

import org.directwebremoting.extend.ServerLoadMonitor; //導入依賴的package包/類
/**
 * Internal use only.
 * <p>If we detect that the server is being shutdown then we want to kill
 * any reverse ajax threads.
 * @param containers The list of containers to look for ServerLoadMonitors in
 * @param title What causes this (for debug purposes)
 */
public static void shutdownServerLoadMonitorsInContainerList(List containers, String title)
{
    if (containers == null || containers.size() == 0)
    {
        log.debug("No containers to shutdown for: " + title);
        return;
    }

    log.debug("Shutting down containers for: " + title);
    for (Iterator it = containers.iterator(); it.hasNext();)
    {
        Container container = (Container) it.next();
        ServerLoadMonitor monitor = (ServerLoadMonitor) container.getBean(ServerLoadMonitor.class.getName());
        monitor.shutdown();
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:24,代碼來源:ContainerUtil.java

示例2: ShutdownAlarm

import org.directwebremoting.extend.ServerLoadMonitor; //導入依賴的package包/類
/**
 * Register ourselves with the ServerLoadMonitor so we can raise an
 * Alarm if we get shutdown
 * @param serverLoadMonitor
 */
public ShutdownAlarm(Sleeper sleeper, ServerLoadMonitor serverLoadMonitor)
{
    this.sleeper = sleeper;
    this.serverLoadMonitor = serverLoadMonitor;
    this.serverLoadMonitor.threadWaitStarting(waitController);
}
 
開發者ID:directwebremoting,項目名稱:dwr,代碼行數:12,代碼來源:ShutdownAlarm.java

示例3: setServerLoadMonitor

import org.directwebremoting.extend.ServerLoadMonitor; //導入依賴的package包/類
/**
 * Accessor for the server load monitor
 * @param serverLoadMonitor the new server load monitor
 */
public void setServerLoadMonitor(ServerLoadMonitor serverLoadMonitor)
{
    this.serverLoadMonitor = serverLoadMonitor;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:9,代碼來源:PollHandler.java

示例4: setupDefaults

import org.directwebremoting.extend.ServerLoadMonitor; //導入依賴的package包/類
/**
 * Take a DefaultContainer and setup the default beans
 * @param container The container to configure
 * @param servletConfig The source of init parameters
 * @throws InstantiationException If we can't instantiate a bean
 * @throws IllegalAccessException If we have access problems creating a bean
 */
public static void setupDefaults(DefaultContainer container, ServletConfig servletConfig) throws InstantiationException, IllegalAccessException
{
    container.addParameter(AccessControl.class.getName(), DefaultAccessControl.class.getName());
    container.addParameter(ConverterManager.class.getName(), DefaultConverterManager.class.getName());
    container.addParameter(CreatorManager.class.getName(), DefaultCreatorManager.class.getName());
    container.addParameter(UrlProcessor.class.getName(), UrlProcessor.class.getName());
    container.addParameter(WebContextBuilder.class.getName(), DefaultWebContextBuilder.class.getName());
    container.addParameter(ServerContextBuilder.class.getName(), DefaultServerContextBuilder.class.getName());
    container.addParameter(AjaxFilterManager.class.getName(), DefaultAjaxFilterManager.class.getName());
    container.addParameter(Remoter.class.getName(), DefaultRemoter.class.getName());
    container.addParameter(DebugPageGenerator.class.getName(), DefaultDebugPageGenerator.class.getName());
    container.addParameter(PlainCallMarshaller.class.getName(), PlainCallMarshaller.class.getName());
    container.addParameter(HtmlCallMarshaller.class.getName(), HtmlCallMarshaller.class.getName());
    container.addParameter(PlainPollHandler.class.getName(), PlainPollHandler.class.getName());
    container.addParameter(HtmlPollHandler.class.getName(), HtmlPollHandler.class.getName());
    container.addParameter(ScriptSessionManager.class.getName(), DefaultScriptSessionManager.class.getName());
    container.addParameter(PageNormalizer.class.getName(), DefaultPageNormalizer.class.getName());

    if (servletConfig.getServletContext().getServerInfo().startsWith("jetty-6"))
    {
        container.addParameter(ServerLoadMonitor.class.getName(), ThreadDroppingServerLoadMonitor.class.getName());
    }
    else
    {
        container.addParameter(ServerLoadMonitor.class.getName(), DefaultServerLoadMonitor.class.getName());
    }

    // Mapping handlers to URLs
    createUrlMapping(container, "/index.html", "indexHandlerUrl", IndexHandler.class);
    createUrlMapping(container, "/engine.js", "engineHandlerUrl", EngineHandler.class);
    createUrlMapping(container, "/util.js", "utilHandlerUrl", UtilHandler.class);
    createUrlMapping(container, "/auth.js", "authHandlerUrl", AuthHandler.class);
    createUrlMapping(container, "/webwork/DWRActionUtil.js", "webworkUtilHandlerUrl", WebworkUtilHandler.class);
    createUrlMapping(container, "/about", "aboutHandlerUrl", AboutHandler.class);
    createUrlMapping(container, "/test/", "testHandlerUrl", TestHandler.class);
    createUrlMapping(container, "/interface/", "interfaceHandlerUrl", InterfaceHandler.class);

    // The Poll and Call URLs can not be changed easily because they are
    // referenced from engine.js. Maybe one day this would be a good
    // extension
    createUrlMapping(container, "/call/plaincall/", "plainCallHandlerUrl", PlainCallHandler.class);
    createUrlMapping(container, "/call/plainpoll/", "plainPollHandlerUrl", PlainPollHandler.class);
    createUrlMapping(container, "/call/htmlcall/", "htmlCallHandlerUrl", HtmlCallHandler.class);
    createUrlMapping(container, "/call/htmlpoll/", "htmlPollHandlerUrl", HtmlPollHandler.class);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:53,代碼來源:ContainerUtil.java

示例5: setServerLoadMonitor

import org.directwebremoting.extend.ServerLoadMonitor; //導入依賴的package包/類
/**
 * Are we supporting streaming?
 * @param serverLoadMonitor the serverLoadMonitor to set
 */
public void setServerLoadMonitor(ServerLoadMonitor serverLoadMonitor)
{
    this.serverLoadMonitor = serverLoadMonitor;
}
 
開發者ID:directwebremoting,項目名稱:dwr,代碼行數:9,代碼來源:BaseEngineHandler.java

示例6: getServerLoadMonitorImplementation

import org.directwebremoting.extend.ServerLoadMonitor; //導入依賴的package包/類
public Class<? extends ServerLoadMonitor> getServerLoadMonitorImplementation()
{
    return DefaultServerLoadMonitor.class;
}
 
開發者ID:directwebremoting,項目名稱:dwr,代碼行數:5,代碼來源:Servlet24ContainerAbstraction.java

示例7: shutdown

import org.directwebremoting.extend.ServerLoadMonitor; //導入依賴的package包/類
/**
 * Kill all comet polls.
 * <p>Technically a servlet engine ought to call this only when all the
 * threads are already removed, however at least Tomcat doesn't do this
 * properly (it waits for a while and then calls destroy anyway).
 * <p>It would be good if we could get {@link #destroy()} to call this
 * method however destroy() is only called once all threads are done so it's
 * too late.
 */
public void shutdown()
{
    ServerLoadMonitor monitor = (ServerLoadMonitor) container.getBean(ServerLoadMonitor.class.getName());
    monitor.shutdown();
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:15,代碼來源:DwrServlet.java

示例8: shutdown

import org.directwebremoting.extend.ServerLoadMonitor; //導入依賴的package包/類
/**
 * Kill all comet polls.
 * <p>Technically a servlet engine ought to call this only when all the
 * threads are already removed, however at least Tomcat doesn't do this
 * properly (it waits for a while and then calls destroy anyway).
 * <p>It would be good if we could get destroy() to call this
 * method however destroy() is only called once all threads are done so it's
 * too late.
 */
public void shutdown() {
    ServerLoadMonitor monitor = (ServerLoadMonitor) container.getBean(ServerLoadMonitor.class.getName());
    monitor.shutdown();
}
 
開發者ID:florinpatrascu,項目名稱:jpublish,代碼行數:14,代碼來源:DWRProcessor.java


注:本文中的org.directwebremoting.extend.ServerLoadMonitor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。