public class RemoteScrapingSessionCommand
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CARRIAGE_RETURN_REPLACER
The carriage return replacer.
|
static java.lang.String |
CMD_DISCONNECT
The commands.
|
static java.lang.String |
CMD_DO_HOT_SWAP_FROM_DATABASE |
static java.lang.String |
CMD_GET_ALL_VARS |
static java.lang.String |
CMD_GET_DATARECORD |
static java.lang.String |
CMD_GET_NEXT_CACHED_DATARECORD |
static java.lang.String |
CMD_GET_NEXT_CACHED_DATARECORDS |
static java.lang.String |
CMD_GET_NUM_DATARECORDS_IN_DATASET |
static java.lang.String |
CMD_GET_VARIABLE |
static java.lang.String |
CMD_LOAD_VARIABLES |
static java.lang.String |
CMD_NEW_SCRAPINGSESSION |
static java.lang.String |
CMD_OUTPUT_LOG_FILES |
static java.lang.String |
CMD_POLL_FOR_DATA |
static java.lang.String |
CMD_SCRAPE |
static java.lang.String |
CMD_SESSION_TIMEDOUT |
static java.lang.String |
CMD_SET_LAZYSCRAPE |
static java.lang.String |
CMD_SET_POLL_FREQUENCY |
static java.lang.String |
CMD_SET_TIMEOUT |
static java.lang.String |
CMD_SET_VARIABLE |
static java.lang.String |
CMD_STOP |
static java.lang.String |
COMMAND_DELIM
The delimiters used in client -> server interactions.
|
static java.lang.String |
DATA_TYPE_DATE |
static java.lang.String |
DATA_TYPE_IDENTIFIER
Used to identify data types of objects passed.
|
static java.lang.String |
DATA_TYPE_NUMBER |
static java.lang.String |
DATARECORD_PREFIX
The 'dataRecord' prefix.
|
static java.lang.String |
DATASET_PREFIX
The 'dataSet' prefix.
|
static java.lang.String |
ERROR_PREFIX
The prefix received in the event of an error.
|
static java.lang.String |
GENERIC_OBJECT_CLASS_SUFFIX
The generic object prefix
|
static java.lang.String |
GENERIC_OBJECT_PREFIX
The generic object prefix
|
static org.apache.log4j.Logger |
log
Used for logging.
|
static java.lang.String |
MSG_SCRAPING_SESSION_COMPLETED
In the case of data polling, used to indicate to the client that the scraping session has completed.
|
static java.lang.String |
NEW_LINE_REPLACER
The new line replacer.
|
static java.lang.String |
PARAM_DELIM |
static java.lang.String |
TUPLET_DELIM
The delimiters used in server -> client interactions.
|
static java.lang.String |
TUPLETS_DELIM |
Constructor and Description |
---|
RemoteScrapingSessionCommand(java.lang.String commandText)
Constructs a new command by parsing the given text.
|
Modifier and Type | Method and Description |
---|---|
void |
dumpToLog()
Dumps the command to the log.
|
boolean |
equalsCommandString(java.lang.String commandText)
Indicates whether or not the command text for this command equals the given text.
|
java.lang.String |
getCommand()
Gets the command text.
|
java.lang.String |
getParameter(int sequence)
Gets a parameter by its sequence.
|
static java.lang.String |
replaceCarriageReturnAndNewLineReplacers(java.lang.String val)
Replaces newline and carriage return replacers with their corresponding tokens.
|
static java.lang.String |
replaceCarriageReturnsAndNewLines(java.lang.String val)
Replaces newlines and carriage returns with their corresponding tokens.
|
public static org.apache.log4j.Logger log
public static final java.lang.String CMD_DISCONNECT
public static final java.lang.String CMD_NEW_SCRAPINGSESSION
public static final java.lang.String CMD_SET_VARIABLE
public static final java.lang.String CMD_SET_TIMEOUT
public static final java.lang.String CMD_SET_LAZYSCRAPE
public static final java.lang.String CMD_GET_VARIABLE
public static final java.lang.String CMD_GET_DATARECORD
public static final java.lang.String CMD_GET_NUM_DATARECORDS_IN_DATASET
public static final java.lang.String CMD_GET_ALL_VARS
public static final java.lang.String CMD_GET_NEXT_CACHED_DATARECORD
public static final java.lang.String CMD_GET_NEXT_CACHED_DATARECORDS
public static final java.lang.String CMD_SESSION_TIMEDOUT
public static final java.lang.String CMD_SCRAPE
public static final java.lang.String CMD_STOP
public static final java.lang.String CMD_LOAD_VARIABLES
public static final java.lang.String CMD_DO_HOT_SWAP_FROM_DATABASE
public static final java.lang.String CMD_OUTPUT_LOG_FILES
public static final java.lang.String CMD_SET_POLL_FREQUENCY
public static final java.lang.String CMD_POLL_FOR_DATA
public static final java.lang.String CARRIAGE_RETURN_REPLACER
public static final java.lang.String NEW_LINE_REPLACER
public static final java.lang.String COMMAND_DELIM
public static final java.lang.String PARAM_DELIM
public static final java.lang.String TUPLET_DELIM
public static final java.lang.String TUPLETS_DELIM
public static final java.lang.String MSG_SCRAPING_SESSION_COMPLETED
public static final java.lang.String DATASET_PREFIX
public static final java.lang.String GENERIC_OBJECT_PREFIX
public static final java.lang.String GENERIC_OBJECT_CLASS_SUFFIX
public static final java.lang.String DATARECORD_PREFIX
public static final java.lang.String ERROR_PREFIX
public static final java.lang.String DATA_TYPE_IDENTIFIER
public static final java.lang.String DATA_TYPE_NUMBER
public static final java.lang.String DATA_TYPE_DATE
public RemoteScrapingSessionCommand(@Nullable java.lang.String commandText)
commandText
- The text that should be parsed in order to derive a command.@Nullable public java.lang.String getCommand()
@Nullable public java.lang.String getParameter(int sequence)
sequence
- The sequence of the desired parameter.public boolean equalsCommandString(@Nullable java.lang.String commandText)
commandText
- The command text.@Nullable @Contract(value="!null -> !null; null -> null") public static java.lang.String replaceCarriageReturnsAndNewLines(@Nullable java.lang.String val)
val
- The value to replace.@Nullable public static java.lang.String replaceCarriageReturnAndNewLineReplacers(@Nullable java.lang.String val)
val
- The value to replace.public void dumpToLog()