Class Writer

    • Constructor Summary

      Constructors 
      Constructor Description
      Writer()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void write​(java.nio.ByteBuffer buffer, CompletionHandler<java.nio.ByteBuffer> completionHandler)
      A backward compatible method called from write(ByteBuffer, CompletionHandler, WriterInfo) to handover the data for a connection to the transport.
      void write​(java.nio.ByteBuffer buffer, CompletionHandler<java.nio.ByteBuffer> completionHandler, WriterInfo writerInfo)
      Tyrus runtime calls this method to handover the data for a connection to the transport.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.io.Closeable

        close
    • Constructor Detail

      • Writer

        public Writer()
    • Method Detail

      • write

        public abstract void write​(java.nio.ByteBuffer buffer,
                                   CompletionHandler<java.nio.ByteBuffer> completionHandler)

        A backward compatible method called from write(ByteBuffer, CompletionHandler, WriterInfo) to handover the data for a connection to the transport. The transport writes bytes to underlying connection. Tyrus runtime must not use the buffer until the write is completed.

        The method will be removed in the next major version.

        Parameters:
        buffer - bytes to write.
        completionHandler - completion handler to know the write status.
      • write

        public void write​(java.nio.ByteBuffer buffer,
                          CompletionHandler<java.nio.ByteBuffer> completionHandler,
                          WriterInfo writerInfo)
        Tyrus runtime calls this method to handover the data for a connection to the transport. The transport writes bytes to underlying connection. Tyrus runtime must not use the buffer until the write is completed.
        Parameters:
        buffer - bytes to write.
        completionHandler - completion handler to know the write status.
        writerInfo - additional information about the data to be written.
        Since:
        1.17