Interface PayloadSerializer

  • All Known Implementing Classes:
    DslJsonSerializer

    public interface PayloadSerializer
    • Method Detail

      • setOutputStream

        void setOutputStream​(java.io.OutputStream os)
        Sets the output stream which the *NdJson methods should write to.
        Parameters:
        os - the OutputStream to which all contents are to be serialized
      • blockUntilReady

        void blockUntilReady()
                      throws java.lang.Exception
        Blocking until this PayloadSerializer is ready for use.
        Throws:
        java.lang.Exception - if blocking was interrupted, or timed out or an error occurred in the underlying implementation
      • serializeTransactionNdJson

        void serializeTransactionNdJson​(Transaction transaction)
      • serializeSpanNdJson

        void serializeSpanNdJson​(Span span)
      • serializeErrorNdJson

        void serializeErrorNdJson​(ErrorCapture error)
      • fullFlush

        void fullFlush()
                throws java.io.IOException
        Flushes the OutputStream which has been set via setOutputStream(OutputStream) and detaches that OutputStream from the serializer.
        Throws:
        java.io.IOException
      • flushToOutputStream

        void flushToOutputStream()
        Flushes content that has been written so far to the OutputStream which has been set via setOutputStream(OutputStream), without flushing the OutputStream itself. Subsequent serializations will be made to the same OutputStream.
      • getBufferSize

        int getBufferSize()
        Gets the number of bytes which are currently buffered
        Returns:
        the number of bytes which are currently buffered
      • serializeFileMetaData

        void serializeFileMetaData​(java.io.File file)
      • getJsonWriter

        com.dslplatform.json.JsonWriter getJsonWriter()
      • writeBytes

        void writeBytes​(byte[] bytes,
                        int len)