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 |
|---|---|
void |
addEvidence(Evidence evidence) |
org.bson.types.ObjectId |
addFile(byte[] bytes,
String filename) |
void |
addRawData(RawData data) |
RawData[] |
findData(org.bson.Document query) |
Evidence[] |
findEvidence(String label) |
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[] |
findLastEvidences(String label,
Subject subject) |
RawData[] |
findRawData(String label,
Subject subject) |
URL |
getURL() |
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 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[] findRawData(String label, Subject subject) 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 Evidence[] findLastEvidences(String label, Subject subject) throws Throwable
findLastEvidences in interface ServerInterfaceThrowablepublic final URL getURL()
getURL in interface ServerInterfaceCopyright © 2019. All rights reserved.