public class ScrapingServer extends java.lang.Thread implements ScrapingSessionNotifiable
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
ScrapingServer.ServerSysTrayMenu
Handles all of the systray menu stuff.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
log
Used for logging.
|
LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO, LEVEL_WARN, STR_LEVEL_DEBUG, STR_LEVEL_ERROR, STR_LEVEL_INFO, STR_LEVEL_WARN| Constructor and Description |
|---|
ScrapingServer()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
block()
Blocks and stops the daemon.
|
boolean |
daemonIsRunning()
Indicates whether or not the daemon is currently running
|
int |
getLoggingLevel()
Gets the current logging level.
|
java.lang.String |
getStatus()
Returns the current status of the server.
|
boolean |
isBlocked()
Indicates whether or not the server is currently blocked.
|
void |
log(java.lang.String message)
Logs a messgae.
|
void |
logDebug(java.lang.String message)
Logs a message with LEVEL_DEBUG.
|
void |
logError(java.lang.String message)
Logs a message with LEVEL_ERROR.
|
void |
logInfo(java.lang.String message)
Logs a message with LEVEL_INFO.
|
void |
logWarn(java.lang.String message)
Logs a message with LEVEL_WARN.
|
void |
run()
The meat of the daemon.
|
void |
scrapingSessionCompleted()
Indicates that the scraping session has ended.
|
void |
setLoggingLevel(int loggingLevel)
Sets the current logging level.
|
void |
shutdownDaemon()
Shuts down the server.
|
boolean |
startDaemon()
Start up the daemon.
|
activeCount, checkAccess, clone, 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, yieldpublic boolean daemonIsRunning()
public boolean startDaemon()
public void shutdownDaemon()
public void block()
public boolean isBlocked()
@NotNull public java.lang.String getStatus()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void log(java.lang.String message)
ScrapingSessionNotifiable.log in interface Notifiablelog in interface ScrapingSessionNotifiablemessage - The message to be logged.public void scrapingSessionCompleted()
ScrapingSessionNotifiable.scrapingSessionCompleted in interface ScrapingSessionNotifiablepublic void logDebug(java.lang.String message)
logDebug in interface NotifiablelogDebug in interface ScrapingSessionNotifiablemessage - The message to be logged.public void logInfo(java.lang.String message)
logInfo in interface NotifiablelogInfo in interface ScrapingSessionNotifiablemessage - The message to be logged.public void logWarn(java.lang.String message)
logWarn in interface NotifiablelogWarn in interface ScrapingSessionNotifiablemessage - The message to be logged.public void logError(java.lang.String message)
logError in interface NotifiablelogError in interface ScrapingSessionNotifiablemessage - The message to be logged.public int getLoggingLevel()
getLoggingLevel in interface NotifiablegetLoggingLevel in interface ScrapingSessionNotifiablepublic void setLoggingLevel(int loggingLevel)
setLoggingLevel in interface NotifiablesetLoggingLevel in interface ScrapingSessionNotifiableloggingLevel - The logging level, as defined by one of the "LOGGING" constants.