public abstract class ErrorableProcess extends Object implements Loggable
Modifier and Type | Field and Description |
---|---|
List<String> |
errors |
org.apache.logging.log4j.Logger |
log |
Constructor and Description |
---|
ErrorableProcess(co.ecg.alpaca.toolkit.model.BroadWorksServer bws) |
Modifier and Type | Method and Description |
---|---|
void |
checkValidity()
Checks the validity of the process
|
String |
exception(Throwable throwable)
Adds an exception error to the errors to report.
|
List<String> |
getErrors()
Retrieves the Error list
|
boolean |
hasErrors()
Reports if the process contains errors
|
boolean |
isError(co.ecg.alpaca.toolkit.messaging.response.Response response)
Checks if a response is an error -- If so add the response message to the list of errors
|
boolean |
isError(co.ecg.alpaca.toolkit.messaging.response.Response response,
String... expectedErrorCodes)
Checks if a Response is an error with optional expected error codes
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSessionLogger, logger
public ErrorableProcess(co.ecg.alpaca.toolkit.model.BroadWorksServer bws)
public boolean hasErrors()
public void checkValidity() throws HelperException
HelperException
public String exception(Throwable throwable)
throwable
- public boolean isError(co.ecg.alpaca.toolkit.messaging.response.Response response)
response
- The response to checkpublic boolean isError(co.ecg.alpaca.toolkit.messaging.response.Response response, String... expectedErrorCodes)
response
- The response to checkexpectedErrorCodes
- The array of expected error codesCopyright © 2016. All rights reserved.