public class ModelScrapingSession extends AbstractModel 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 |
---|
ModelScrapingSession()
An empty constructor.
|
Modifier and Type | Method and Description |
---|---|
ScrapingSession |
getCurrentScrapingSession()
Gets a reference to the current
ScrapingSession . |
int |
getLoggingLevel()
Gets the current logging level.
|
void |
handleAppEvent(AppEvent ape)
Allows the class to handle AppEvents.
|
void |
log(java.lang.String message)
Sends an app event off to the view to be logged.
|
void |
log(java.lang.String message,
int loggingLevel)
Sends an app event off to the view to be logged.
|
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 |
scrapingSessionCompleted()
Indicates that the scraping session has ended.
|
void |
setLoggingLevel(int loggingLevel)
Sets the current logging level.
|
getController, setController
public void log(java.lang.String message)
log
in interface Notifiable
log
in interface ScrapingSessionNotifiable
message
- The message to be logged.public void logDebug(java.lang.String message)
logDebug
in interface Notifiable
logDebug
in interface ScrapingSessionNotifiable
message
- The message to be logged.public void logInfo(java.lang.String message)
logInfo
in interface Notifiable
logInfo
in interface ScrapingSessionNotifiable
message
- The message to be logged.public void logWarn(java.lang.String message)
logWarn
in interface Notifiable
logWarn
in interface ScrapingSessionNotifiable
message
- The message to be logged.public void logError(java.lang.String message)
logError
in interface Notifiable
logError
in interface ScrapingSessionNotifiable
message
- The message to be logged.public void log(java.lang.String message, int loggingLevel)
message
- The message to be logged.loggingLevel
- The logging level of the message.public void scrapingSessionCompleted()
scrapingSessionCompleted
in interface ScrapingSessionNotifiable
public int getLoggingLevel()
getLoggingLevel
in interface Notifiable
getLoggingLevel
in interface ScrapingSessionNotifiable
public void setLoggingLevel(int loggingLevel)
setLoggingLevel
in interface Notifiable
setLoggingLevel
in interface ScrapingSessionNotifiable
loggingLevel
- The logging level, as defined by one of the
"LOGGING" constants.@InternalOnly public ScrapingSession getCurrentScrapingSession()
ScrapingSession
.ScrapingSession
.public void handleAppEvent(AppEvent ape)
handleAppEvent
in class AbstractModel
ape
- An AppEvent
.