public class UniRestEngine extends java.lang.Object implements IRestEngine
UNIREST (see: http://unirest.io/java.html)
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MSG_REQUEST_HAS_BEEN_CANCELLED |
static java.lang.String |
MSG_REQUEST_HAS_FAILED |
static java.lang.String |
MSG_REQUEST_WAS_SUCCESSFUL |
static java.lang.String |
MSG_URL_IS_NULL
some constants
|
HEADER_ACCESS, HEADER_APP_JSON| Constructor and Description |
|---|
UniRestEngine() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(BreinConfig breinConfig)
configures the rest engine
|
BreinResult |
doLookup(BreinLookup breinLookup)
performs a lookup and provides details
|
void |
doRequest(BreinActivity breinActivity)
Invokes the asynch post call
|
void |
terminate()
used to stop the UNIREST threads
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFullyQualifiedUrl, getRequestBody, getRestEngine, isUrlValid, validate, validateBreinBase, validateConfig, validateUrlpublic static final java.lang.String MSG_URL_IS_NULL
public static final java.lang.String MSG_REQUEST_HAS_FAILED
public static final java.lang.String MSG_REQUEST_HAS_BEEN_CANCELLED
public static final java.lang.String MSG_REQUEST_WAS_SUCCESSFUL
public void configure(BreinConfig breinConfig)
configure in interface IRestEnginebreinConfig - configuration objectpublic void doRequest(BreinActivity breinActivity) throws BreinException
doRequest in interface IRestEnginebreinActivity - data to sendBreinExceptionpublic BreinResult doLookup(BreinLookup breinLookup) throws BreinException
doLookup in interface IRestEnginebreinLookup - contains request dataBreinException - in case of an errorpublic void terminate()
terminate in interface IRestEngineCopyright © Breinify - All Rights Reserved.