public class IdscpClient
extends java.lang.Object
Simply call connect() and use the returned WebSocket object for bidirectional
text/binary web socket communication with the remote endpoint.
Make sure to check handleAttestationResult() and getMetaData() to
assess trustworthiness of the remote endpoint and the self description returned by it.
| Constructor and Description |
|---|
IdscpClient() |
| Modifier and Type | Method and Description |
|---|---|
@NonNull IdscpClient |
config(@NonNull ClientConfiguration config)
Sets the configuration of this client.
|
org.asynchttpclient.ws.WebSocket |
connect(@NonNull java.lang.String host,
int port)
Connects to a remote endpoint, executes the IDSCP handshake and returns the ready-to-use
WebSocket object.
|
org.asynchttpclient.ws.WebSocket |
connect(java.net.URI uri)
Deprecated.
|
@Nullable de.fhg.aisec.ids.api.conm.RatResult |
getAttestationResult()
Returns null if attestation has not yet finished, or status code of remote attestation
otherwise.
|
@Nullable java.lang.String |
getMetaData()
Returns meta data about the remote endpoint or
null if no meta data has been
exchanged. |
@Deprecated
public org.asynchttpclient.ws.WebSocket connect(java.net.URI uri)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.security.KeyManagementException,
java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - Use connect(String host, int port) instead.java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.security.KeyManagementExceptionpublic org.asynchttpclient.ws.WebSocket connect(@NonNull java.lang.String host,
int port)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.security.KeyManagementException,
java.security.NoSuchAlgorithmException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.security.KeyManagementExceptionjava.security.NoSuchAlgorithmExceptionpublic @NonNull IdscpClient config(@NonNull ClientConfiguration config)
Use this method in a fluent API style before calling connect():
new IdscpClient().config(config).connect(url);
public @Nullable de.fhg.aisec.ids.api.conm.RatResult getAttestationResult()
public @Nullable java.lang.String getMetaData()
null if no meta data has been
exchanged.