public class GetCotHistoryOperation extends HTTPOperation
Modifier and Type | Class and Description |
---|---|
static interface |
GetCotHistoryOperation.ParseCallback |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARAM_REQUEST |
static java.lang.String |
PARAM_RESPONSE |
PARAM_STATUSCODE, STATUSCODE_UNKNOWN
Constructor and Description |
---|
GetCotHistoryOperation() |
Modifier and Type | Method and Description |
---|---|
android.os.Bundle |
execute(android.content.Context context,
Request request) |
static void |
parseCotEvents(java.lang.String xml,
GetCotHistoryOperation.ParseCallback cb)
Parse CoT events one by one with a callback which decides how to handle
each CoT event and whether to continue parsing
|
static java.util.List<CotEvent> |
parseCotEvents(java.lang.String xml,
java.lang.String matcher,
long startTime,
java.util.List<java.lang.String> whiteList)
Parse events
Optionally filter out those before start time
Optionally filter out those not on the whitelist
|
getErrorMessage
public static final java.lang.String PARAM_REQUEST
public static final java.lang.String PARAM_RESPONSE
public android.os.Bundle execute(android.content.Context context, Request request) throws ConnectionException, DataException
ConnectionException
DataException
public static java.util.List<CotEvent> parseCotEvents(java.lang.String xml, java.lang.String matcher, long startTime, java.util.List<java.lang.String> whiteList)
xml
- the xml file to parse from the response bodymatcher
- the substring the xml needs to contain for validation purposes.startTime
- the start time to remove outdated xml messageswhiteList
- white list of uids that are always allowed.public static void parseCotEvents(java.lang.String xml, GetCotHistoryOperation.ParseCallback cb)
xml
- CoT events list XMLcb
- Parse callback