public class HttpPollerProcessor extends Object
| Constructor and Description |
|---|
HttpPollerProcessor()
default as the cronus agent poller
Assuming the polling API is By HTTP GET; without any postbody (for GET, no
post body for sure)
|
HttpPollerProcessor(String pollerType,
String successRegex,
String failureRegex,
String uuidRegex,
String progressRegex,
int progressStuckTimeoutSeconds,
long pollIntervalMillis,
String pollerRequestTemplate,
String jobIdPlaceHolder,
int maxPollError)
Instantiates a new http poller processor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFailureRegex()
Gets the failure regex.
|
String |
getJobIdPlaceHolder()
Gets the job id place holder.
|
String |
getJobIdRegex()
Gets the job id regex.
|
int |
getMaxPollError()
Gets the max poll error.
|
String |
getPollerRequestTemplate()
Gets the poller request template.
|
String |
getPollerRequestUrl(String uuid)
Important.
|
String |
getPollerType()
Gets the poller type.
|
long |
getPollIntervalMillis()
Gets the poll interval millis.
|
double |
getProgressFromResponse(ResponseOnSingeRequest myResponse)
Gets the progress from response.
|
String |
getProgressRegex()
Gets the progress regex.
|
int |
getProgressStuckTimeoutSeconds()
Gets the progress stuck timeout seconds.
|
String |
getUuidFromResponse(ResponseOnSingeRequest myResponse)
Gets the uuid from response.
|
boolean |
ifTaskCompletedSuccessOrFailureFromResponse(ResponseOnSingeRequest myResponse)
If task completed success or failure from response.
|
boolean |
ifThereIsErrorInResponse(ResponseOnSingeRequest myResponse)
If there is error in response.
|
void |
setFailureRegex(String failureRegex)
Sets the failure regex.
|
void |
setJobIdPlaceHolder(String jobIdPlaceHolder)
Sets the job id place holder.
|
void |
setJobIdRegex(String jobIdRegex)
Sets the job id regex.
|
void |
setMaxPollError(int maxPollError)
Sets the max poll error.
|
void |
setPollerRequestTemplate(String pollerRequestTemplate)
Sets the poller request template.
|
void |
setPollerType(String pollerType)
Sets the poller type.
|
void |
setPollIntervalMillis(long pollIntervalMillis)
Sets the poll interval millis.
|
void |
setProgressRegex(String progressRegex)
Sets the progress regex.
|
void |
setProgressStuckTimeoutSeconds(int progressStuckTimeoutSeconds)
Sets the progress stuck timeout seconds.
|
String |
toString() |
public HttpPollerProcessor()
public HttpPollerProcessor(String pollerType, String successRegex, String failureRegex, String uuidRegex, String progressRegex, int progressStuckTimeoutSeconds, long pollIntervalMillis, String pollerRequestTemplate, String jobIdPlaceHolder, int maxPollError)
pollerType - the poller typesuccessRegex - the success regexfailureRegex - the failure regexuuidRegex - the uuid regexprogressRegex - the progress regexprogressStuckTimeoutSeconds - the progress stuck timeout secondspollIntervalMillis - the poll interval millispollerRequestTemplate - the poller request templatejobIdPlaceHolder - the job id place holdermaxPollError - the max poll errorpublic String getPollerRequestUrl(String uuid)
uuid - the uuidpublic long getPollIntervalMillis()
public void setPollIntervalMillis(long pollIntervalMillis)
pollIntervalMillis - the new poll interval millispublic String getPollerRequestTemplate()
public void setPollerRequestTemplate(String pollerRequestTemplate)
pollerRequestTemplate - the new poller request templatepublic String getUuidFromResponse(ResponseOnSingeRequest myResponse)
myResponse - the my responsepublic double getProgressFromResponse(ResponseOnSingeRequest myResponse)
myResponse - the my responsepublic boolean ifThereIsErrorInResponse(ResponseOnSingeRequest myResponse)
myResponse - the my responsepublic boolean ifTaskCompletedSuccessOrFailureFromResponse(ResponseOnSingeRequest myResponse)
myResponse - the my responsepublic String getPollerType()
public void setPollerType(String pollerType)
pollerType - the new poller typepublic String getFailureRegex()
public void setFailureRegex(String failureRegex)
failureRegex - the new failure regexpublic String getProgressRegex()
public void setProgressRegex(String progressRegex)
progressRegex - the new progress regexpublic int getProgressStuckTimeoutSeconds()
public void setProgressStuckTimeoutSeconds(int progressStuckTimeoutSeconds)
progressStuckTimeoutSeconds - the new progress stuck timeout secondspublic String getJobIdPlaceHolder()
public void setJobIdPlaceHolder(String jobIdPlaceHolder)
jobIdPlaceHolder - the new job id place holderpublic String getJobIdRegex()
public void setJobIdRegex(String jobIdRegex)
jobIdRegex - the new job id regexpublic int getMaxPollError()
public void setMaxPollError(int maxPollError)
maxPollError - the new max poll errorCopyright © 2015–2016 eBay. All rights reserved.