Interface MediaTypeFactory

All Superinterfaces:
org.refcodes.factory.MarshalFactory<String>, org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<InputStream>, org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<String,InputStream>, MediaTypesAccessor, org.refcodes.factory.UnmarshalFactory<String>, org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>, org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<String,InputStream>
All Known Implementing Classes:
FormMediaTypeFactory, HtmlMediaTypeFactory, JsonMediaTypeFactory, TextMediaTypeFactory, XmlMediaTypeFactory, YamlMediaTypeFactory

public interface MediaTypeFactory extends org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<String,InputStream>, org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<String,InputStream>, MediaTypesAccessor
The MediaTypeFactory creates instances from an HTTP body and creates an HTTP body from given instances according to the MediaType (as of MediaTypesAccessor.getMediaTypes()) for which the MediaTypeFactory is responsible.
  • Field Details

  • Method Details

    • fromMarshaled

      default <T> T fromMarshaled(InputStream aContentInputStream, Class<T> aType) throws org.refcodes.exception.UnmarshalException
      Specified by:
      fromMarshaled in interface org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
      Throws:
      org.refcodes.exception.UnmarshalException
    • fromMarshaled

      default Object fromMarshaled(InputStream aContentInputStream, Class<?>... aTypes) throws org.refcodes.exception.UnmarshalException
      Specified by:
      fromMarshaled in interface org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
      Throws:
      org.refcodes.exception.UnmarshalException
    • fromMarshaled

      default Object fromMarshaled(InputStream aContentInputStream, Map<String,String> aProperties, Class<?>... aTypes) throws org.refcodes.exception.UnmarshalException
      Specified by:
      fromMarshaled in interface org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
      Throws:
      org.refcodes.exception.UnmarshalException
    • fromMarshaled

      default <T> T fromMarshaled(InputStream aContentInputStream, Class<T> aType, Map<String,String> aProperties) throws org.refcodes.exception.UnmarshalException
      Specified by:
      fromMarshaled in interface org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
      Throws:
      org.refcodes.exception.UnmarshalException
    • fromUnmarshaled

      default <SRC> InputStream fromUnmarshaled(SRC aContext) throws org.refcodes.exception.MarshalException
      Specified by:
      fromUnmarshaled in interface org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<InputStream>
      Throws:
      org.refcodes.exception.MarshalException
    • fromUnmarshaled

      default <SRC> InputStream fromUnmarshaled(SRC aContext, Map<String,String> aProperties) throws org.refcodes.exception.MarshalException
      Specified by:
      fromUnmarshaled in interface org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<InputStream>
      Throws:
      org.refcodes.exception.MarshalException