org.directwebremoting.server.tomcat
Class TomcatContainerAbstraction

java.lang.Object
  extended by org.directwebremoting.server.tomcat.TomcatContainerAbstraction
All Implemented Interfaces:
ContainerAbstraction

public class TomcatContainerAbstraction
extends java.lang.Object
implements ContainerAbstraction

An abstraction of the servlet container that is specific to Tomcat

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

Constructor Summary
TomcatContainerAbstraction()
           
 
Method Summary
 Sleeper createSleeper(javax.servlet.http.HttpServletRequest request)
          Create a sleeper that is appropriate for the given servlet container
 java.lang.Class<? extends ServerLoadMonitor> getServerLoadMonitorImplementation()
          The setup process allows the ContainerAbstraction to select a special ServerLoadMonitor implementation
 boolean isNativeEnvironment(javax.servlet.ServletConfig servletConfig)
          We ask ContainerAbstractions to identify if the environment given is 'theirs'.
 boolean isResponseCompleted(javax.servlet.http.HttpServletRequest request)
          Some async-servlet implementations (Jetty) restart requests, when we might have already completed dealing with them.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TomcatContainerAbstraction

public TomcatContainerAbstraction()
Method Detail

isResponseCompleted

public boolean isResponseCompleted(javax.servlet.http.HttpServletRequest request)
Description copied from interface: ContainerAbstraction
Some async-servlet implementations (Jetty) restart requests, when we might have already completed dealing with them. If this method returns true then PollHandler will assume that we're done and will bail out before we even get started.

Specified by:
isResponseCompleted in interface ContainerAbstraction
Parameters:
request - The request that we might be finished with
Returns:
true if the request is completed

isNativeEnvironment

public boolean isNativeEnvironment(javax.servlet.ServletConfig servletConfig)
Description copied from interface: ContainerAbstraction
We ask ContainerAbstractions to identify if the environment given is 'theirs'. Are they fit for this environment?

Specified by:
isNativeEnvironment in interface ContainerAbstraction
Parameters:
servletConfig - Access to ServletContext etc.
Returns:
true if this implementation should be used

createSleeper

public Sleeper createSleeper(javax.servlet.http.HttpServletRequest request)
Description copied from interface: ContainerAbstraction
Create a sleeper that is appropriate for the given servlet container

Specified by:
createSleeper in interface ContainerAbstraction
Parameters:
request - The Sleeper will probably need to know about the request
Returns:
A method of sending threads to sleep.

getServerLoadMonitorImplementation

public java.lang.Class<? extends ServerLoadMonitor> getServerLoadMonitorImplementation()
Description copied from interface: ContainerAbstraction
The setup process allows the ContainerAbstraction to select a special ServerLoadMonitor implementation

Specified by:
getServerLoadMonitorImplementation in interface ContainerAbstraction
Returns:
The ServerLoadMonitor implementation to go with this container

Copyright 2008