01: /*
02: * Copyright 2005 Joe Walker
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.directwebremoting.impl;
17:
18: import javax.servlet.ServletConfig;
19: import javax.servlet.http.HttpServletRequest;
20:
21: import org.directwebremoting.extend.ContainerAbstraction;
22: import org.directwebremoting.extend.ServerLoadMonitor;
23: import org.directwebremoting.extend.Sleeper;
24:
25: /**
26: * An abstraction of the servlet container that just follows the standards
27: * @author Joe Walker [joe at getahead dot ltd dot uk]
28: */
29: public class ServletSpecContainerAbstraction implements
30: ContainerAbstraction {
31: /* (non-Javadoc)
32: * @see org.directwebremoting.dwrp.ContainerAbstraction#createSleeper(javax.servlet.http.HttpServletRequest)
33: */
34: public Sleeper createSleeper(HttpServletRequest request) {
35: return new ThreadWaitSleeper();
36: }
37:
38: /* (non-Javadoc)
39: * @see org.directwebremoting.dwrp.ContainerAbstraction#getServerLoadMonitorImplementation()
40: */
41: public Class<? extends ServerLoadMonitor> getServerLoadMonitorImplementation() {
42: return DefaultServerLoadMonitor.class;
43: }
44:
45: /* (non-Javadoc)
46: * @see org.directwebremoting.dwrp.ContainerAbstraction#isNativeEnvironment(javax.servlet.ServletConfig)
47: */
48: public boolean isNativeEnvironment(ServletConfig servletConfig) {
49: return true;
50: }
51: }
|