KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > directwebremoting > ServerContext


1 /*
2  * Copyright 2005 Joe Walker
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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;
17
18 import java.util.Collection JavaDoc;
19
20 import javax.servlet.ServletConfig JavaDoc;
21 import javax.servlet.ServletContext JavaDoc;
22
23 /**
24  * @author Joe Walker [joe at getahead dot ltd dot uk]
25  */

26 public interface ServerContext
27 {
28     /**
29      * Get a list of all ScriptSessions on a given page.
30      * Note that the list of known sessions is continually changing so it is
31      * possible that the list will be out of date by the time it is used. For
32      * this reason you should check that getScriptSession(String id) returns
33      * something non null.
34      * @param url The URL including 'http://', up to (but not including) '?' or '#'
35      * @return A collection of all the ScriptSessions.
36      */

37     Collection JavaDoc getScriptSessionsByPage(String JavaDoc url);
38
39     /**
40      * Get a list of all the ScriptSessions known to this server at the given
41      * time.
42      * Note that the list of known sessions is continually changing so it is
43      * possible that the list will be out of date by the time it is used. For
44      * this reason you should check that getScriptSession(String id) returns
45      * something non null.
46      * @return A collection of all the ScriptSessions.
47      */

48     Collection JavaDoc getAllScriptSessions();
49
50     /**
51      * Accessor for the servlet config.
52      * @return Returns the config.
53      */

54     ServletConfig JavaDoc getServletConfig();
55
56     /**
57      * Returns the ServletContext to which this session belongs.
58      * @return The servlet context information.
59      */

60     ServletContext JavaDoc getServletContext();
61
62     /**
63      * Accessor for the IoC container.
64      * @return The IoC container that created the interface implementations.
65      */

66     Container getContainer();
67
68     /**
69      * Fish the version number out of the dwr.properties file.
70      * @return The current version number.
71      */

72     String JavaDoc getVersion();
73 }
74
Popular Tags