Class BulkRestDataSender

  • All Implemented Interfaces:,

    public class BulkRestDataSender
    Used to post large quantities of data to yamcs. The data is sent using HTTP chuncked encoding
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void channelRead0​( ctx, io.netty.handler.codec.http.FullHttpResponse msg)  
      CompletableFuture<byte[]> completeRequest()
      Complete the request by a final empty chunck and return the response from the server.
      void handlerAdded​( ctx)  
      void sendData​(byte[] data)
      send the next chunk of data.
      void sendData​(io.netty.buffer.ByteBuf buf)  
      • Methods inherited from class

        acceptInboundMessage, channelRead
      • Methods inherited from class

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class

        ensureNotSharable, handlerRemoved, isSharable
      • Methods inherited from interface

    • Constructor Detail

      • BulkRestDataSender

        public BulkRestDataSender()
    • Method Detail

      • handlerAdded

        public void handlerAdded​( ctx)
                          throws Exception
        Specified by:
        handlerAdded in interface
        handlerAdded in class
      • sendData

        public void sendData​(byte[] data)
                      throws ClientException
        send the next chunk of data. The caller is blocked if it sends data faster that can be transfered to the server.
        data -
        ClientException - when there is an exception sending the data. The exception is also thrown if no data can be sent for 10 seconds
      • completeRequest

        public CompletableFuture<byte[]> completeRequest()
        Complete the request by a final empty chunck and return the response from the server.
        a CompletableFuture that completes once the response from the server has been received.
      • channelRead0

        protected void channelRead0​( ctx,
                                    io.netty.handler.codec.http.FullHttpResponse msg)
                             throws Exception
        Specified by:
        channelRead0 in class<io.netty.handler.codec.http.FullHttpResponse>