Interface DecodeFunction<T>

  • Type Parameters:
    T - Type of the result of the function.
    All Known Subinterfaces:
    Codec<T>
    All Known Implementing Classes:
    GossipProtocolCodec
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface DecodeFunction<T>
    Functional interface for decoding data from binary format.
    • Method Detail

      • decode

        T decode​(DataReader in)
          throws IOException
        Decodes object from the provided reader.
        Parameters:
        in - Data reader.
        Returns:
        Decoded object.
        Throws:
        IOException - If object couldn't be decoded.