org.yamcs.client.base.AbstractStreamSender Maven / Gradle / Ivy
package org.yamcs.client.base;
import java.util.concurrent.CompletableFuture;
import org.yamcs.client.ClientException;
import org.yamcs.client.StreamSender;
import com.google.protobuf.Message;
public class AbstractStreamSender implements StreamSender {
private BulkRestDataSender baseSender;
public AbstractStreamSender(BulkRestDataSender baseSender) {
this.baseSender = baseSender;
}
@Override
public void send(ItemT message) {
try {
baseSender.sendData(message.toByteArray());
} catch (ClientException e) {
// TODO somehow emit to general future
e.printStackTrace();
}
}
@Override
public CompletableFuture complete() {
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy