public class FileDispatchHandler extends java.lang.Object implements DispatchHandler
Constructor and Description |
---|
FileDispatchHandler() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called when the servlet is shutdown.
|
boolean |
fileDispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean sendResponse)
Performs dispatching for file requests.
|
long |
getLastModified(javax.servlet.http.HttpServletRequest req) |
void |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
init(javax.servlet.http.HttpServlet servlet,
org.jdom.Element config)
Since a constructor cannot be defined for an interface there needs to
be a way to initialize the objects state.
|
void |
init(javax.servlet.http.HttpServlet servlet,
org.jdom.Element config,
BesApi besApi) |
boolean |
requestCanBeHandled(javax.servlet.http.HttpServletRequest request) |
void |
sendFile(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse response) |
public void init(javax.servlet.http.HttpServlet servlet, org.jdom.Element config) throws java.lang.Exception
DispatchHandler
init
in interface DispatchHandler
servlet
- This should be the IsoDispatchHandler that creates the
instance of IsoDispatchHandler that is being intialized.config
- A JDOM Element objct containing the XML Element that
announced which implementation of IsoDispatchHandler to use. It may (or
may not) contain additional confguration information.java.lang.Exception
- When the bad things happen.DispatchServlet
public void init(javax.servlet.http.HttpServlet servlet, org.jdom.Element config, BesApi besApi) throws java.lang.Exception
init
in interface DispatchHandler
java.lang.Exception
public boolean requestCanBeHandled(javax.servlet.http.HttpServletRequest request) throws java.lang.Exception
requestCanBeHandled
in interface DispatchHandler
request
- The request to be handled.java.lang.Exception
- When the bad things happen.public void handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
handleRequest
in interface DispatchHandler
request
- The request to be handled.response
- The response object into which the response information
will be placed.java.lang.Exception
- When the bad things happen.public long getLastModified(javax.servlet.http.HttpServletRequest req)
getLastModified
in interface DispatchHandler
req
- The request for which we need to get a last modified date.HttpServlet
public void destroy()
DispatchHandler
destroy
in interface DispatchHandler
public boolean fileDispatch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean sendResponse) throws java.lang.Exception
request
- .response
- .sendResponse
- If this is true a response will be sent. If it is
the request will only be evaluated to determine if a response can be
generated.java.lang.Exception
- .public void sendFile(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
java.lang.Exception