org.directwebremoting.server.servlet2
Class Servlet2ContainerAbstraction

java.lang.Object
  extended by org.directwebremoting.server.servlet2.Servlet2ContainerAbstraction
All Implemented Interfaces:
ContainerAbstraction

public class Servlet2ContainerAbstraction
extends java.lang.Object
implements ContainerAbstraction

An abstraction of the servlet container that just follows the standards

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

Constructor Summary
Servlet2ContainerAbstraction()
           
 
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

Servlet2ContainerAbstraction

public Servlet2ContainerAbstraction()
Method Detail

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

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

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

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.

Copyright 2008