public class StrmPrivacyClient
extends java.lang.Object
| Constructor and Description |
|---|
StrmPrivacyClient(java.lang.String billingId,
java.lang.String clientId,
java.lang.String clientSecret,
Config config) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jetty.client.api.ContentResponse |
egressIsAlive()
queries the egress /is-alive endpoint, which should return ok
|
java.util.concurrent.CompletableFuture<org.eclipse.jetty.client.api.ContentResponse> |
send(io.strmprivacy.schemas.StrmPrivacyEvent event,
SerializationType type)
send an StrmPrivacyEvent.
|
void |
startReceivingWs(boolean asJson,
WebSocketConsumer consumer)
Start an endless loop that receives events through a websocket and applies `consumer` to them.
|
void |
stop()
Disconnects the client and frees up any resources
|
public StrmPrivacyClient(java.lang.String billingId,
java.lang.String clientId,
java.lang.String clientSecret,
Config config)
public java.util.concurrent.CompletableFuture<org.eclipse.jetty.client.api.ContentResponse> send(io.strmprivacy.schemas.StrmPrivacyEvent event,
SerializationType type)
event - the event.type - the serialization type. only for Avropublic void startReceivingWs(boolean asJson,
WebSocketConsumer consumer)
asJson - tells the server to convert the event data to json. Otherwise you get base64 encoded data
that might be avro binary, avro json or json depending on the schema and the serialization type.
This will be handled in a future version of the Java driver.
consumer - The consumer to apply to the ws eventspublic org.eclipse.jetty.client.api.ContentResponse egressIsAlive()
public void stop()