|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.impl.DefaultServerContext
public class DefaultServerContext
The Default implementation of ServerContext
| Constructor Summary | |
|---|---|
DefaultServerContext()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.util.Collection<ScriptSession> |
getAllScriptSessions()
Get a list of all the ScriptSessions known to this server at the given time. |
Container |
getContainer()
Accessor for the IoC container. |
java.lang.String |
getContextPath()
Returns the portion of the request URI that indicates the context of the request. |
ScriptSession |
getScriptSessionById(java.lang.String sessionId)
You can request access to a specific ScriptSession if you know
it's ID. |
java.util.Collection<ScriptSession> |
getScriptSessionsByPage(java.lang.String url)
Get a list of all ScriptSessions on a given page. |
javax.servlet.ServletConfig |
getServletConfig()
Accessor for the servlet config. |
javax.servlet.ServletContext |
getServletContext()
Returns the ServletContext to which this session belongs. |
java.lang.String |
getVersion()
Fish the version number out of the dwr.properties file. |
void |
setContainer(Container container)
Injection point for Container |
void |
setServletConfig(javax.servlet.ServletConfig servletConfig)
Injection point for ServletConfig |
void |
setServletContext(javax.servlet.ServletContext servletContext)
Injection point for ServletContext |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultServerContext()
| Method Detail |
|---|
public java.util.Collection<ScriptSession> getAllScriptSessions()
ServerContext
getAllScriptSessions in interface ServerContextpublic java.util.Collection<ScriptSession> getScriptSessionsByPage(java.lang.String url)
ServerContext
getScriptSessionsByPage in interface ServerContexturl - The URL including 'http://', up to (but not including) '?' or '#'
public ScriptSession getScriptSessionById(java.lang.String sessionId)
ServerContextScriptSession if you know
it's ID.
Take care with this method because it allows actions from one browser to affect another which could be a bad thing. It is certainly a VERY BAD idea to let session id's from one browser escape into another.
Consider that it is entirely possible that the ScriptSession may timeout while you are holding a reference to it.
getScriptSessionById in interface ServerContextsessionId - The script session ID to lookup
public void setContainer(Container container)
public Container getContainer()
ServerContext
getContainer in interface ServerContextpublic void setServletConfig(javax.servlet.ServletConfig servletConfig)
public javax.servlet.ServletConfig getServletConfig()
ServerContext
getServletConfig in interface ServerContextpublic void setServletContext(javax.servlet.ServletContext servletContext)
public javax.servlet.ServletContext getServletContext()
ServerContext
getServletContext in interface ServerContextpublic java.lang.String getVersion()
ServerContext
getVersion in interface ServerContextpublic java.lang.String getContextPath()
ServerContextAnnoyingly you can't get to this from the ServletContext until
servlet 2.5 you need to cache the value from a recent HttpServletRequest.
The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For servlets in the default (root) context, this method returns "". The container does not decode this string.
WARNING: This method may return null if DWR has not received any requests. If this method is called from outside of DWR, as the servlet environment is starting up you should check for a null reply and try again later.
getContextPath in interface ServerContextpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||