Interface MessageWriter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int separator()
      Write an entry separator to the writer.
      <Message extends net.morimekta.providence.PMessage<Message>>
      int
      write​(net.morimekta.providence.PMessageOrBuilder<Message> message)
      Write a providence message to the writer.
      <Message extends net.morimekta.providence.PMessage<Message>>
      int
      write​(net.morimekta.providence.PServiceCall<Message> call)
      Write a providence service call to the writer.
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • write

        <Message extends net.morimekta.providence.PMessage<Message>> int write​(net.morimekta.providence.PMessageOrBuilder<Message> message)
                                                                        throws java.io.IOException
        Write a providence message to the writer.
        Type Parameters:
        Message - The message type.
        Parameters:
        message - The message to write.
        Returns:
        The number of bytes written.
        Throws:
        java.io.IOException - If write failed.
      • write

        <Message extends net.morimekta.providence.PMessage<Message>> int write​(net.morimekta.providence.PServiceCall<Message> call)
                                                                        throws java.io.IOException
        Write a providence service call to the writer.
        Type Parameters:
        Message - The message type embedded in the call.
        Parameters:
        call - The service call to write.
        Returns:
        The number of bytes written.
        Throws:
        java.io.IOException - If write failed.
      • separator

        int separator()
               throws java.io.IOException
        Write an entry separator to the writer.
        Returns:
        The number of bytes written.
        Throws:
        java.io.IOException - If write failed.