Interface WebPart

All Superinterfaces:
Part

public interface WebPart extends Part

A part with payload decoding support.

Implementors should rely on MediaTypeConverter to decode a part's payload based on its content type.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    decoder(Class<A> type)
    Returns a decoder to decode the part's payload to the specified type based on the part's content type.
    decoder(Type type)
    Returns a decoder to decode the part's payload to the specified type based on the part's content type.

    Methods inherited from interface io.inverno.mod.http.server.Part

    getFilename, getName, headers, raw, string
  • Method Details

    • decoder

      <A> InboundDataDecoder<A> decoder(Class<A> type)

      Returns a decoder to decode the part's payload to the specified type based on the part's content type.

      Type Parameters:
      A - the decoded type
      Parameters:
      type - a class of A
      Returns:
      a decoder
    • decoder

      <A> InboundDataDecoder<A> decoder(Type type)

      Returns a decoder to decode the part's payload to the specified type based on the part's content type.

      Type Parameters:
      A - the decoded type
      Parameters:
      type - the decoded type
      Returns:
      a decoder