bass.crawler
Class CrawlerServer
java.lang.Object
java.lang.Thread
bass.crawler.CrawlerServer
- All Implemented Interfaces:
- java.lang.Runnable
public class CrawlerServer
- extends java.lang.Thread
Server class
- Version:
- 0.1
- Author:
- Thomas Klein
| Nested classes/interfaces inherited from class java.lang.Thread |
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
|
Constructor Summary |
private |
CrawlerServer(java.net.Socket clientSocket)
basic contructor to start a new thread handling a clients needs |
|
Method Summary |
private static void |
initBandDistribution()
inits a bandDistibution with all the band-ids in the db |
private static void |
initBandDistribution(java.io.File openFile)
inits a bandDistribution with the band-ids from the file |
private static PageDistributon |
initPDFromFile(java.io.File openFile)
|
static void |
main(java.lang.String[] args)
the main method
this is only run once and looping endlessly listening for clients
if a client is detected a new instance of this file is started to serve its needs |
void |
run()
|
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
port
private static final int port
- See Also:
- Constant Field Values
client
private java.net.Socket client
pd
private static PageDistributon pd
td
private static PageDistributon td
bd
private static BandDistribution bd
cd
private static CountryDistribution cd
currentCountry
private static java.lang.String currentCountry
lastCountry
private static java.lang.String lastCountry
gui
private static ServerGui gui
clientReg
private static ClientRegistration clientReg
timeOutChecker
private static javax.swing.Timer timeOutChecker
isGettingNewCountry
private static boolean isGettingNewCountry
wroteErrornousProfilePages
private static boolean wroteErrornousProfilePages
uIDmanager
private static UndoneIDManagement uIDmanager
doneIDs
private static java.util.Hashtable<java.lang.Integer,java.lang.Boolean> doneIDs
uIDRefresher
private static javax.swing.Timer uIDRefresher
uIDAL
private static java.awt.event.ActionListener uIDAL
timeOutCheck
private static java.awt.event.ActionListener timeOutCheck
CrawlerServer
private CrawlerServer(java.net.Socket clientSocket)
- basic contructor to start a new thread handling a clients needs
- Parameters:
clientSocket - the socket returned from server.accept()
main
public static void main(java.lang.String[] args)
throws java.net.MalformedURLException,
java.io.IOException
- the main method
this is only run once and looping endlessly listening for clients
if a client is detected a new instance of this file is started to serve its needs
- Throws:
java.net.MalformedURLException
java.io.IOException
run
public void run()
- Specified by:
run in interface java.lang.Runnable- Overrides:
run in class java.lang.Thread
initBandDistribution
private static void initBandDistribution()
- inits a bandDistibution with all the band-ids in the db
initBandDistribution
private static void initBandDistribution(java.io.File openFile)
- inits a bandDistribution with the band-ids from the file
- Parameters:
openFile - an errorlogfile
initPDFromFile
private static PageDistributon initPDFromFile(java.io.File openFile)