java.lang.Object
io.helidon.nima.http.media.multipart.MultiPartSupport
All Implemented Interfaces:
MediaSupport

public class MultiPartSupport extends Object implements MediaSupport
Media support implementation for support of multipart.
  • Field Details

    • DEFAULT_BOUNDARY

      public static final String DEFAULT_BOUNDARY
      The default boundary used for encoding multipart messages.
      See Also:
  • Method Details

    • create

      public static MediaSupport create(Config config)
      Creates a new MultiPartSupport.
      Parameters:
      config - must not be null
      Returns:
      a new MultiPartSupport
    • init

      public void init(MediaContext context)
      Description copied from interface: MediaSupport
      Once all providers are discovered/configured and context is established, the MediaContext calls this method on all providers to allow sub-resolution of readers and writers.
      Specified by:
      init in interface MediaSupport
      Parameters:
      context - media context context
    • reader

      public <T> MediaSupport.ReaderResponse<T> reader(GenericType<T> type, Headers requestHeaders)
      Description copied from interface: MediaSupport
      Reader for an entity.
      Specified by:
      reader in interface MediaSupport
      Type Parameters:
      T - type
      Parameters:
      type - type of entity
      requestHeaders - headers belonging to this entity (such as server request headers), expected to have content type
      Returns:
      reader response, whether this type is supported or not
    • writer

      public <T> MediaSupport.WriterResponse<T> writer(GenericType<T> type, Headers requestHeaders, WritableHeaders<?> responseHeaders)
      Description copied from interface: MediaSupport
      Server response writer.
      Specified by:
      writer in interface MediaSupport
      Type Parameters:
      T - type
      Parameters:
      type - type of entity
      requestHeaders - request headers
      responseHeaders - response headers
      Returns:
      writer response, whether this type is supported or not
    • reader

      public <T> MediaSupport.ReaderResponse<T> reader(GenericType<T> type, Headers requestHeaders, Headers responseHeaders)
      Description copied from interface: MediaSupport
      Client response reader.
      Specified by:
      reader in interface MediaSupport
      Type Parameters:
      T - type
      Parameters:
      type - type of entity
      requestHeaders - request headers
      responseHeaders - response headers
      Returns:
      reader response, whether this type is supported or not
    • writer

      public <T> MediaSupport.WriterResponse<T> writer(GenericType<T> type, WritableHeaders<?> requestHeaders)
      Description copied from interface: MediaSupport
      Client request writer.
      Specified by:
      writer in interface MediaSupport
      Type Parameters:
      T - type
      Parameters:
      type - type of entity
      requestHeaders - request headers
      Returns:
      writer response, whether this type is supported or not