org.mmbase.servlet
Class BridgeServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--org.mmbase.servlet.MMBaseServlet
|
+--org.mmbase.servlet.BridgeServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- HandleServlet, performance
- public abstract class BridgeServlet
- extends MMBaseServlet
BridgeServlet is an MMBaseServlet with a bridge Cloud in it. Extending from this makes it easy to
implement servlet implemented with the MMBase bridge interfaces.
An advantage of this is that security is used, which means that you cannot unintentionly serve
content to the whole world which should actually be protected by the security mechanism.
Another advantage is that implementation using the bridge is easier/clearer.
The query of a bridge servlet can possible start with session= in which case the
cloud is taken from that session attribute with that name. Otherewise 'cloud_mmbase' is
supposed. All this is only done if there was a session active at all. If not, or the session
variable was not found, that an anonymous cloud is used.
- Since:
- MMBase-1.6
- Version:
- $Id: BridgeServlet.java,v 1.6.2.1 2003/02/20 12:09:29 michiel Exp $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
|
Method Summary |
protected Cloud |
getCloud(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
StringObject query)
|
protected java.lang.String |
getCloudName()
Returns known functions which can be performed with bridge-functionality
specialisations would increase the priority for their specific goal. |
protected long |
getLastModified(javax.servlet.http.HttpServletRequest req)
The idea is that a 'bridge servlet' on default serves 'nodes', and that there could be
defined a 'last modified' time for nodes. |
protected Node |
getNode(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Servlets would often need a node. |
void |
init()
The init of an MMBaseServlet checks if MMBase is running. |
protected java.lang.String |
readQuery(StringObject query,
javax.servlet.http.HttpServletResponse res)
Remove session information from query object, and returns session-name (or null) |
| Methods inherited from class org.mmbase.servlet.MMBaseServlet |
associateMapping, decRefCount, destroy, doGet, getAssociations, getRequestURL, getServletByAssociation, getServletByMapping, getServletInfo, getServletMappings, getServletMappingsByAssociation, incRefCount, service |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, doPut, doTrace, service |
| Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BridgeServlet
public BridgeServlet()
getCloudName
protected java.lang.String getCloudName()
- Returns known functions which can be performed with bridge-functionality
specialisations would increase the priority for their specific goal.
readQuery
protected java.lang.String readQuery(StringObject query,
javax.servlet.http.HttpServletResponse res)
throws java.io.IOException
- Remove session information from query object, and returns session-name (or null)
getCloud
protected Cloud getCloud(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
StringObject query)
throws java.io.IOException
getNode
protected Node getNode(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws java.io.IOException
- Servlets would often need a node. This function will get one for you using the query string.
This is convenient, and also ensures that all this kind of servlet work uniformely.
getLastModified
protected long getLastModified(javax.servlet.http.HttpServletRequest req)
- The idea is that a 'bridge servlet' on default serves 'nodes', and that there could be
defined a 'last modified' time for nodes. This can't be determined right now, so 'now' is
returned.
This function is defined in HttpServlet
- Overrides:
getLastModified in class javax.servlet.http.HttpServlet
init
public void init()
throws javax.servlet.ServletException
- Description copied from class:
MMBaseServlet
- The init of an MMBaseServlet checks if MMBase is running. It not then it is started.
- Overrides:
init in class MMBaseServlet
MMBase build 1.6.5.20030923