public class CommandLineScriptHandler extends java.lang.Object 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 | 
|---|
CommandLineScriptHandler(java.lang.String scriptOrScrapingSessionName,
                        java.lang.String commandLineParameters)
Initiates the handler to run the given script with the given
 session variables. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
getLoggingLevel()
Gets the current logging level. 
 | 
void | 
log(java.lang.String message)
Logs a message. 
 | 
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 | 
outputLogMessage(java.lang.String message)
Logs a message to stdout. 
 | 
void | 
scrapingSessionCompleted()
Indicates that the scraping session has ended. 
 | 
void | 
setLoggingLevel(int loggingLevel)
Sets the current logging level. 
 | 
public CommandLineScriptHandler(java.lang.String scriptOrScrapingSessionName,
                                java.lang.String commandLineParameters)
scriptOrScrapingSessionName - The name of the script to be run.commandLineParameters - A URL-encoded string of command-line parameters.public void outputLogMessage(java.lang.String message)
message - The message to be logged.public void log(java.lang.String message)
ScrapingSessionNotifiable.log in interface Notifiablelog in interface ScrapingSessionNotifiablemessage - The message to be logged.public 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 void log(java.lang.String message,
                int loggingLevel)
message - The message to be logged.loggingLevel - The logging level of the message.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.public void scrapingSessionCompleted()
ScrapingSessionNotifiable.scrapingSessionCompleted in interface ScrapingSessionNotifiable