Class PayloadedResponse<T,​E extends Exception>

Type Parameters:
T - The type of parsed payload value.
E - The type of exception thrown by the payload parser.
All Implemented Interfaces:
Supplier<T>
Direct Known Subclasses:
CountState.Response, FixedRouteRead.Response, GetChipInfo.Response, GetReinjectionStatus.Response, GetVersion.Response, IPTagGet.Response, IPTagGetInfo.Response, IPTagSetTTO.Response, ReadLink.Response, ReadMemory.Response, RouterAlloc.Response, SDRAMAlloc.Response, SDRAMDeAlloc.Response

public abstract class PayloadedResponse<T,​E extends Exception>
extends CheckOKResponse
implements Supplier<T>
A response that holds a payload.
Author:
Donal Fellows
  • Method Details

    • get

      public final T get()
      Specified by:
      get in interface Supplier<T>
    • parse

      @ForOverride protected abstract T parse​(ByteBuffer buffer) throws E extends Exception
      Parse the payload of a response. The buffer will be positioned after the checked header.
      Parameters:
      buffer - The buffer to parse. Little-endian.
      Returns:
      The parsed value.
      Throws:
      E - If parsing fails.