T - The type of data that this server is dealing with (can be a link
between between a local computer and a server on the internet, or a person,
etc.).public interface ServerInterface<T extends Subject>
| Modifier and Type | Method and Description |
|---|---|
DetectionAgentProfile[] |
activation()
Get the current configuration (activation profiles).
|
void |
addEvidence(Evidence evidence) |
org.bson.types.ObjectId |
addFile(byte[] bytes,
String filename) |
void |
addRawData(RawData<T> data)
Add raw data to the datastore and eventually trigger analysis.
|
boolean |
compareAndSwapInCache(String key,
Object new_value,
Object old_value)
Compare and swap verify if the current stored value in the cache is
equals to old_value, or if the value has never been stored in the cache
for this key.
|
Map<String,Object> |
executorStatus()
Get the status of the executor service (running tasks etc).
|
RawData[] |
findData(org.bson.Document query)
Search for data with a custom filter (don't forget to mention a label,
for example).
|
Evidence<T>[] |
findEvidence(String label)
Find the evidences with highest score, for given label and for all
subjects.
|
Evidence<T>[] |
findEvidence(String label,
int page)
Find evidence of given label, for all subjects.
|
Evidence<T>[] |
findEvidence(String label,
T subject) |
Evidence<T> |
findEvidenceById(String id)
Get a single evidence by id.
|
Evidence<T>[] |
findEvidenceSince(String label,
T subject,
long time) |
byte[] |
findFile(org.bson.types.ObjectId file_id) |
Evidence<T>[] |
findLastEvidences(String label,
T subject)
Find the evidences according to a pattern (that start with provided
pattern), and if multiple evidences are found with same label, return the
most recent one.
|
RawData<T>[] |
findRawData(String type,
T subject) |
Object |
getFromCache(String key)
get value from cache represented by a map.
|
URL |
getURL() |
void |
storeInCache(String key,
Object value)
Store the value in the cache with the key key.
|
String |
test() |
void |
testString(String data) |
String test() throws Throwable
Throwablevoid testString(String data) throws Throwable
data - Throwable - if request failsvoid addRawData(RawData<T> data) throws Throwable
data - Throwable - if request failsvoid addEvidence(Evidence evidence) throws Throwable
evidence - Throwable - if request failsorg.bson.types.ObjectId addFile(byte[] bytes,
String filename)
throws Throwable
bytes - filename - Throwable - if request failsbyte[] findFile(org.bson.types.ObjectId file_id)
throws Throwable
file_id - Throwable - if request fails.RawData<T>[] findRawData(String type, T subject) throws Throwable
type - subject - Throwable - if request failsEvidence<T>[] findEvidence(String label, T subject) throws Throwable
label - subject - Throwable - if request failsEvidence<T>[] findEvidenceSince(String label, T subject, long time) throws Throwable
label - subject - time - Throwable - if something goes wrongEvidence<T>[] findEvidence(String label) throws Throwable
label - Throwable - if request failsEvidence<T>[] findEvidence(String label, int page) throws Throwable
label - page - Throwable - if request failsEvidence<T> findEvidenceById(String id) throws Throwable
id - Throwable - if request failsURL getURL()
Evidence<T>[] findLastEvidences(String label, T subject) throws Throwable
label - subject - Throwable - if an error occuredRawData[] findData(org.bson.Document query) throws Throwable
query - Throwable - if an error occuredObject getFromCache(String key) throws Throwable
key - to get value.Throwable - if an error occuredvoid storeInCache(String key, Object value) throws Throwable
key - to store value.value - to store.Throwable - if any problems happens.boolean compareAndSwapInCache(String key, Object new_value, Object old_value) throws Throwable
key - to store new value.new_value - to be stored.old_value - to verify current value.Throwable - if any problems happens.Map<String,Object> executorStatus() throws Throwable
Throwable - if something goes wrongDetectionAgentProfile[] activation() throws Throwable
Throwable - if something goes wrongCopyright © 2019. All rights reserved.