public abstract class BridgeServlet extends MMBaseServlet
| Modifier and Type | Class and Description |
|---|---|
static class |
BridgeServlet.QueryParts
Keeps track of determined information, to avoid redetermining it.
|
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
FILE_PATTERN
Pattern used for the 'filename' part of the request.
|
static String |
MESSAGE_ATTRIBUTE |
mmbase, retryAfter| Constructor and Description |
|---|
BridgeServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected Node |
desperatelyGetNode(Cloud cloud,
String nodeIdentifier)
Extensions can override this, to produce a node, even if cloud.hasNode failed.
|
protected Cloud |
findCloud(Cloud c,
String nodeNumber,
BridgeServlet.QueryParts query)
Tries to find a Cloud which can read the given node.
|
protected Cloud |
getAnonymousCloud()
Obtains an 'anonymous' cloud.
|
protected Cloud |
getClassCloud()
Obtains a cloud using 'class' security.
|
protected Cloud |
getCloud(BridgeServlet.QueryParts qp)
Obtains a cloud object, using a QueryParts object.
|
protected String |
getCloudName()
The name of the mmbase cloud which must be used.
|
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(BridgeServlet.QueryParts query)
Servlets would often need a node.
|
protected Node |
getServedNode(BridgeServlet.QueryParts qp,
Node node)
If the node associated with the resonse is another node then the node associated with the request.\
(E.g.
|
void |
init()
Inits lastmodifiedField.
|
protected BridgeServlet.QueryParts |
readQuery(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Creates a QueryParts object which wraps request and response and the parse result of them.
|
static BridgeServlet.QueryParts |
readQuery(String query) |
protected BridgeServlet.QueryParts |
readQueryFromRequestURI(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
static BridgeServlet.QueryParts |
readServletPath(String servletPath) |
associateMapping, checkInited, decRefCount, destroy, doGet, getAssociations, getBasePath, getMMBase, getRequestURL, getServletByAssociation, getServletByMapping, getServletInfo, getServletMappings, getServletMappingsByAssociation, incRefCount, service, setInitException, setMMBasedoDelete, doHead, doOptions, doPost, doPut, doTrace, servicepublic static final String MESSAGE_ATTRIBUTE
public static final Pattern FILE_PATTERN
protected String getCloudName()
protected BridgeServlet.QueryParts readQuery(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws IOException
null if something went wrong (in that case an error was sent, using the response).IOExceptionprotected BridgeServlet.QueryParts readQueryFromRequestURI(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws IOException
IOExceptionpublic static BridgeServlet.QueryParts readServletPath(String servletPath)
public static BridgeServlet.QueryParts readQuery(String query)
protected final Cloud getCloud(BridgeServlet.QueryParts qp) throws IOException
null if unsuccessful (this may not be fatal).IOExceptionprotected final Cloud getAnonymousCloud()
protected Cloud getClassCloud()
protected Cloud findCloud(Cloud c, String nodeNumber, BridgeServlet.QueryParts query) throws IOException
IOExceptionprotected final Node getNode(BridgeServlet.QueryParts query) throws IOException
query - A QueryParts object, which you must have obtained by readQuery(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)IOExceptionprotected Node desperatelyGetNode(Cloud cloud, String nodeIdentifier)
protected Node getServedNode(BridgeServlet.QueryParts qp, Node node) throws IOException
qp - A QueryParts object, which you must have obtained by readQuery(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)node - The node which is specified on the URL (obtained by getNode(org.mmbase.servlet.BridgeServlet.QueryParts)IOExceptionprotected long getLastModified(javax.servlet.http.HttpServletRequest req)
getLastModified in class javax.servlet.http.HttpServletpublic void init()
throws javax.servlet.ServletException
init in class MMBaseServletjavax.servlet.ServletExceptionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}