Class ConnectablePayloadWriter<T>

    • Constructor Detail

      • ConnectablePayloadWriter

        public ConnectablePayloadWriter()
    • Method Detail

      • write

        public void write​(T t)
                   throws java.io.IOException
        Description copied from interface: PayloadWriter
        Write an object of type PayloadWriter.
        Specified by:
        write in interface PayloadWriter<T>
        Parameters:
        t - the object to write.
        Throws:
        java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if this has been closed.
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • close

        public void close​(java.lang.Throwable cause)
                   throws java.io.IOException
        Description copied from interface: PayloadWriter
        This method shares the same characteristics as Closeable.close() but propagates cause to downstream consumer instead of propagating "successful" completion. Here are notable characteristics shared with Closeable.close():
        • Resources are reclaimed
        • This method is idempotent
        • Subsequent calls to PayloadWriter.write(Object) are expected to fail
        • Before any exception is thrown, all resources must be reclaimed and cause propagated
        Specified by:
        close in interface PayloadWriter<T>
        Parameters:
        cause - Indicate the close is a result of a failure.
        Throws:
        java.io.IOException - if an input/output error occurs.