Class PartialType<T,​X>

    • Constructor Detail

      • PartialType

        protected PartialType​(X param,
                              java.lang.Class<T> type)
      • PartialType

        protected PartialType​(X param,
                              java.lang.String name,
                              java.lang.Class<T> type)
    • Method Detail

      • read

        public abstract T read​(io.netty.buffer.ByteBuf buffer,
                               X param)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • write

        public abstract void write​(io.netty.buffer.ByteBuf buffer,
                                   X param,
                                   T object)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • read

        public final T read​(io.netty.buffer.ByteBuf buffer)
                     throws java.lang.Exception
        Description copied from interface: ByteBufReader
        Read a value from a ByteBuf
        Parameters:
        buffer - The buffer to read from.
        Returns:
        The type based on the class type.
        Throws:
        java.lang.Exception - Throws exception if it failed reading.
      • write

        public final void write​(io.netty.buffer.ByteBuf buffer,
                                T object)
                         throws java.lang.Exception
        Description copied from interface: ByteBufWriter
        Write an object to a type to a ByteBuf
        Parameters:
        buffer - The buffer to write to
        object - The object to write
        Throws:
        java.lang.Exception - Throws if it failed to write