public class FileScrapingSessionNotifiable extends FileNotifiable implements ScrapingSessionNotifiable
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 |
---|
FileScrapingSessionNotifiable(java.lang.String scrapingSessionName,
java.lang.String characterSet,
java.lang.String rand)
Constructs a DefaultScrapingSessionNotifiable to be used with
the named scraping session.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getCloseLogFileOnCompletion()
Indicates whether or not the log file should be closed when the
scraping session completes.
|
void |
scrapingSessionCompleted()
Indicates that the scraping session has ended.
|
void |
setCloseLogFileOnCompletion(boolean closeLogFileOnCompletion)
Sets whether or not the log file should be closed when the
scraping session completes.
|
void |
setParentScrapingSessionNotifiable(ScrapingSessionNotifiable parentScrapingSessionNotifiable)
Holds a parent
ScrapingSessionNotifiable that messages
should be propagated to. |
closeLog, getLogFileName, getLoggingLevel, log, logDebug, logError, logInfo, logWarn, setLogFile, setLoggingLevel, writeLogLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLoggingLevel, log, logDebug, logError, logInfo, logWarn, setLoggingLevel
public FileScrapingSessionNotifiable(java.lang.String scrapingSessionName, java.lang.String characterSet, java.lang.String rand)
scrapingSessionName
- The name of the ScrapingSession
.characterSet
- The character set to use for the log file.rand
- A random string, just in case the system time is the same as another
(yes, it does happen).public void scrapingSessionCompleted()
scrapingSessionCompleted
in interface ScrapingSessionNotifiable
public void setParentScrapingSessionNotifiable(ScrapingSessionNotifiable parentScrapingSessionNotifiable)
ScrapingSessionNotifiable
that messages
should be propagated to.
Note that at present only the scrapingSessionCompleted
message gets
propagated.parentScrapingSessionNotifiable
- A ScrapingSessionNotifiable
.public boolean getCloseLogFileOnCompletion()
public void setCloseLogFileOnCompletion(boolean closeLogFileOnCompletion)