Package io.grpc

Interface MethodDescriptor.Marshaller<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T parse​(java.io.InputStream stream)
      Given an InputStream parse it into an instance of the declared type so that it can be passed to application code.
      java.io.InputStream stream​(T value)
      Given a message, produce an InputStream for it so that it can be written to the wire.
    • Method Detail

      • stream

        java.io.InputStream stream​(T value)
        Given a message, produce an InputStream for it so that it can be written to the wire. Where possible implementations should produce streams that are KnownLength to improve transport efficiency.
        Parameters:
        value - to serialize.
        Returns:
        serialized value as stream of bytes.
      • parse

        T parse​(java.io.InputStream stream)
        Given an InputStream parse it into an instance of the declared type so that it can be passed to application code.
        Parameters:
        stream - of bytes for serialized value
        Returns:
        parsed value