org.directwebremoting.dwrp
Class BasePollHandler

java.lang.Object
  extended by org.directwebremoting.dwrp.BaseDwrpHandler
      extended by org.directwebremoting.dwrp.BasePollHandler
All Implemented Interfaces:
Handler
Direct Known Subclasses:
HtmlPollHandler, PlainPollHandler

public class BasePollHandler
extends BaseDwrpHandler

A Marshaller that output plain Javascript. This marshaller can be tweaked to output Javascript in an HTML context. This class works in concert with CallScriptConduit, they should be considered closely related and it is important to understand what one does while editing the other.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
BasePollHandler(boolean plain)
           
 
Method Summary
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle a URL request that has been mapped to this Handler
 boolean isJsonOutput()
           
 void setActiveReverseAjaxEnabled(boolean activeReverseAjaxEnabled)
          Are we doing full reverse ajax
 void setContainerAbstraction(ContainerAbstraction containerAbstraction)
           
 void setConverterManager(ConverterManager converterManager)
          Accessor for the DefaultConverterManager that we configure
 void setJsonOutput(boolean jsonOutput)
           
 void setMaxWaitAfterWrite(int maxWaitAfterWrite)
          Sometimes with proxies, you need to close the stream all the time to make the flush work.
 void setPageNormalizer(PageNormalizer pageNormalizer)
          Accessor for the PageNormalizer.
 void setPollAndCometEnabled(boolean pollAndCometEnabled)
          Deprecated. Use setActiveReverseAjaxEnabled(boolean)
 void setScheduledThreadPoolExecutor(java.util.concurrent.ScheduledThreadPoolExecutor executor)
          How often do we check for script sessions that need timing out
 void setScriptSessionManager(ScriptSessionManager scriptSessionManager)
           
 void setServerLoadMonitor(ServerLoadMonitor serverLoadMonitor)
          Accessor for the server load monitor
 
Methods inherited from class org.directwebremoting.dwrp.BaseDwrpHandler
setAllowGetForSafariButMakeForgeryEasier, setCrossDomainSessionSecurity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasePollHandler

public BasePollHandler(boolean plain)
Parameters:
plain - Are we using plain javascript or html wrapped javascript
Method Detail

handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException
Description copied from interface: Handler
Handle a URL request that has been mapped to this Handler

Parameters:
request - The HTTP request data
response - Where we write the HTTP response data
Throws:
java.io.IOException - If the write process fails

isJsonOutput

public boolean isJsonOutput()
Returns:
Are we outputting in JSON mode?

setJsonOutput

public void setJsonOutput(boolean jsonOutput)
Parameters:
jsonOutput - Are we outputting in JSON mode?

setPollAndCometEnabled

@Deprecated
public void setPollAndCometEnabled(boolean pollAndCometEnabled)
Deprecated. Use setActiveReverseAjaxEnabled(boolean)

Use setActiveReverseAjaxEnabled(boolean)

Parameters:
pollAndCometEnabled - Are we doing full reverse ajax

setActiveReverseAjaxEnabled

public void setActiveReverseAjaxEnabled(boolean activeReverseAjaxEnabled)
Are we doing full reverse ajax

Parameters:
activeReverseAjaxEnabled - Are we doing full reverse ajax

setMaxWaitAfterWrite

public void setMaxWaitAfterWrite(int maxWaitAfterWrite)
Sometimes with proxies, you need to close the stream all the time to make the flush work. A value of -1 indicated that we do not do early closing after writes.

Parameters:
maxWaitAfterWrite - the maxWaitAfterWrite to set

setPageNormalizer

public void setPageNormalizer(PageNormalizer pageNormalizer)
Accessor for the PageNormalizer.

Parameters:
pageNormalizer - The new PageNormalizer

setServerLoadMonitor

public void setServerLoadMonitor(ServerLoadMonitor serverLoadMonitor)
Accessor for the server load monitor

Parameters:
serverLoadMonitor - the new server load monitor

setConverterManager

public void setConverterManager(ConverterManager converterManager)
Accessor for the DefaultConverterManager that we configure

Parameters:
converterManager - The new DefaultConverterManager

setScriptSessionManager

public void setScriptSessionManager(ScriptSessionManager scriptSessionManager)
Parameters:
scriptSessionManager - the scriptSessionManager to set

setContainerAbstraction

public void setContainerAbstraction(ContainerAbstraction containerAbstraction)
Parameters:
containerAbstraction - the containerAbstraction to set

setScheduledThreadPoolExecutor

public void setScheduledThreadPoolExecutor(java.util.concurrent.ScheduledThreadPoolExecutor executor)
How often do we check for script sessions that need timing out


Copyright 2008