|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
dea.albums.BaseServlet
dea.albums.ChkSite
Field Summary |
Fields inherited from class dea.albums.BaseServlet |
display |
Fields inherited from interface dea.common.IDebugLevels |
BASIC, DEBUG_ALL, ERROR, METH_DETAIL, METH_ENTER, METH_EXIT, METH_EXT, METH_GET, METH_SET, METH_VARS, SHOW_PASS |
Constructor Summary | |
ChkSite()
|
Method Summary | |
java.lang.String |
chkLine(java.lang.String tag,
java.lang.String line,
java.net.URL thisConn)
If line contains the tag then returns a string of the URL pointed to. |
java.lang.String |
getBase(java.net.URL thisConn)
returns String representing the parent dir of the URL |
java.lang.String |
getConn(java.net.URL thisConn)
returns String representing the protocal, host and port of the URL |
int |
getDownloaded()
|
int |
getHad()
|
java.lang.String |
getLine(java.io.BufferedReader reader)
Wait up to 100 * maxRetries for data to be available |
int |
getLinks()
|
int |
getOffSite()
|
int |
getScanned()
|
void |
getSite()
This method loops through the queue till it has processed every URL encountered. |
void |
logBad(LinkInfo li,
java.lang.String msg)
write bad links to log and |
static void |
main(java.lang.String[] args)
|
boolean |
mkdirs(java.lang.String s)
Creates subdirectories as needed to complete path. |
void |
parse(java.lang.String[] args)
parses the command line arguments. |
java.lang.String |
performTask(HttpServletRequest request,
HttpServletResponse response)
This servlet load loads a site and makes note of which links are bad |
void |
process(java.lang.String[] args)
|
boolean |
scanSite(java.lang.String url,
int curLvl)
Save the file pointed to by url to disk. |
void |
setup()
Used to setup vars, files and directories. |
Methods inherited from class dea.albums.BaseServlet |
callPage, emptyToNull, getParameter, init, service |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChkSite()
Method Detail |
public int getLinks()
public int getScanned()
public int getDownloaded()
public int getHad()
public int getOffSite()
public void process(java.lang.String[] args)
public java.lang.String performTask(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException, java.lang.Exception
request
- HttpServletRequestresponse
- HttpServletResponse
java.io.IOException
ServletException
java.lang.Exception
public boolean mkdirs(java.lang.String s) throws java.io.IOException
s
- String representing the directory path that needs to be created.
java.io.IOException
- if unable to create directorypublic void parse(java.lang.String[] args) throws java.lang.Exception
args
- A string array of the command line arguments.
java.lang.Exception
public void logBad(LinkInfo li, java.lang.String msg)
public void setup() throws java.lang.Exception
java.lang.Exception
public java.lang.String getLine(java.io.BufferedReader reader)
public void getSite()
public boolean scanSite(java.lang.String url, int curLvl) throws java.lang.Exception
url
- String represnting the URL to get / scancurLvl
- int of how many levels deep we are currently at.
java.lang.Exception
- any exception encountered to be handeled by callerpublic java.lang.String getBase(java.net.URL thisConn)
thisConn
- URL of the page this link came from.
public java.lang.String getConn(java.net.URL thisConn)
thisConn
- URL of the page this link came from.
public java.lang.String chkLine(java.lang.String tag, java.lang.String line, java.net.URL thisConn) throws java.io.NotActiveException
tag
- tag / parm string to search for as in `A HREF` or `src`.
tag is converted to lower case before compareline
- string to search in.
line is converted to lower case before comparethisConn
- URL of the page this link came from.
java.io.NotActiveException
- if it can not resolve a URL starting with ../public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |