T - public class Client<T extends Subject> extends Object implements ServerInterface
| Constructor and Description |
|---|
Client(URL server_url,
SubjectAdapter adapter)
Create a connection to server with provided URL, and test the connection.
|
| Modifier and Type | Method and Description |
|---|---|
DetectionAgentProfile[] |
activation() |
void |
addEvidence(Evidence evidence) |
org.bson.types.ObjectId |
addFile(byte[] bytes,
String filename) |
void |
addRawData(RawData data) |
boolean |
compareAndSwapInCache(String key,
Object new_value,
Object old_value) |
Map |
dbStatus() |
Map |
executorStatus() |
RawData[] |
findData(org.bson.Document query) |
RawData[] |
findData(String json_query)
Allow to pass a json string to search RawData.
|
Evidence[] |
findEvidence(String label) |
Evidence[] |
findEvidence(String label,
int page) |
Evidence[] |
findEvidence(String label,
Subject subject) |
Evidence |
findEvidenceById(String id)
Find a single evidence by id or throw an exception (if id is invalid).
|
Evidence[] |
findEvidenceSince(String label,
Subject subject,
long time) |
byte[] |
findFile(org.bson.types.ObjectId file_id) |
Evidence[] |
findLastEvidences(String label,
Subject subject) |
RawData[] |
findRawData(String label,
Subject subject,
long from,
long till) |
Object |
getFromCache(String key) |
com.googlecode.jsonrpc4j.JsonRpcClient |
getJsonRpcClient()
Get the internal json_rpc_client.
|
URL |
getURL() |
void |
pause() |
void |
resume() |
Map |
status() |
void |
storeInCache(String key,
Object value) |
String |
test() |
void |
testString(String data) |
public Client(URL server_url, SubjectAdapter adapter)
server_url - adapter - public final String test() throws Throwable
test in interface ServerInterfaceThrowablepublic final void addRawData(RawData data) throws Throwable
addRawData in interface ServerInterfacedata - Throwablepublic final org.bson.types.ObjectId addFile(byte[] bytes,
String filename)
throws Throwable
addFile in interface ServerInterfacebytes - Throwablepublic final byte[] findFile(org.bson.types.ObjectId file_id)
throws Throwable
findFile in interface ServerInterfacefile_id - Throwablepublic final void testString(String data) throws Throwable
testString in interface ServerInterfacedata - Throwablepublic final RawData[] findData(org.bson.Document query) throws Throwable
findData in interface ServerInterfaceThrowablepublic final RawData[] findData(String json_query) throws Throwable
json_query - Throwable - if something went wrong...public final RawData[] findRawData(String label, Subject subject, long from, long till) throws Throwable
findRawData in interface ServerInterfacelabel - subject - Throwablepublic final Evidence[] findEvidence(String label, Subject subject) throws Throwable
findEvidence in interface ServerInterfacelabel - subject - Throwablepublic final Evidence findEvidenceById(String id) throws Throwable
findEvidenceById in interface ServerInterfaceid - Throwablepublic final void addEvidence(Evidence evidence) throws Throwable
addEvidence in interface ServerInterfaceevidence - Throwablepublic final Evidence[] findEvidence(String label) throws Throwable
findEvidence in interface ServerInterfacelabel - Throwablepublic final Evidence[] findEvidence(String label, int page) throws Throwable
findEvidence in interface ServerInterfacelabel - page - Throwablepublic final Evidence[] findLastEvidences(String label, Subject subject) throws Throwable
findLastEvidences in interface ServerInterfaceThrowablepublic final URL getURL()
getURL in interface ServerInterfacepublic final Object getFromCache(String key) throws Throwable
getFromCache in interface ServerInterfaceThrowablepublic final void storeInCache(String key, Object value) throws Throwable
storeInCache in interface ServerInterfaceThrowablepublic final boolean compareAndSwapInCache(String key, Object new_value, Object old_value) throws Throwable
compareAndSwapInCache in interface ServerInterfaceThrowablepublic final DetectionAgentProfile[] activation() throws Throwable
activation in interface ServerInterfaceThrowable - if anything goes wrongpublic final Map executorStatus() throws Throwable
executorStatus in interface ServerInterfaceThrowablepublic final Evidence[] findEvidenceSince(String label, Subject subject, long time) throws Throwable
findEvidenceSince in interface ServerInterfaceThrowablepublic final com.googlecode.jsonrpc4j.JsonRpcClient getJsonRpcClient()
public final void pause()
throws Throwable
pause in interface ServerInterfaceThrowablepublic final void resume()
throws Throwable
resume in interface ServerInterfaceThrowablepublic final Map status() throws Throwable
status in interface ServerInterfaceThrowablepublic final Map dbStatus() throws Throwable
dbStatus in interface ServerInterfaceThrowableCopyright © 2019. All rights reserved.