public class StreamMachineClient extends Object
| Constructor and Description |
|---|
StreamMachineClient(String billingId,
String clientId,
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
|
CompletableFuture<org.eclipse.jetty.client.api.ContentResponse> |
send(io.streammachine.schemas.StreamMachineEvent event,
SerializationType type)
send a StreamMachineEvent.
|
void |
startReceivingWs(boolean asJson,
WebSocketConsumer consumer)
Start an endless loop that receives events through a websocket and applies `consumer` to them.
|
public CompletableFuture<org.eclipse.jetty.client.api.ContentResponse> send(io.streammachine.schemas.StreamMachineEvent 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()
Copyright © 2021. All rights reserved.