Interface MediaTypeFactory

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


    public interface MediaTypeFactory
    extends org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<java.lang.String,java.io.InputStream>, org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<java.lang.String,java.io.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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.factory.MarshalFactory

        org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<C extends java.lang.Object>, org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<T extends java.lang.Object,C extends java.lang.Object>
      • Nested classes/interfaces inherited from interface org.refcodes.factory.UnmarshalFactory

        org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<C extends java.lang.Object>, org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<T extends java.lang.Object,C extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.Object fromMarshaled​(java.io.InputStream aContentInputStream, java.lang.Class<?>... aTypes)
      default <T> T fromMarshaled​(java.io.InputStream aContentInputStream, java.lang.Class<T> aType)
      default <T> T fromMarshaled​(java.io.InputStream aContentInputStream, java.lang.Class<T> aType, java.util.Map<java.lang.String,java.lang.String> aProperties)
      default java.lang.Object fromMarshaled​(java.io.InputStream aContentInputStream, java.util.Map<java.lang.String,java.lang.String> aProperties, java.lang.Class<?>... aTypes)
      default <SRC> java.io.InputStream fromUnmarshaled​(SRC aContext)
      default <SRC> java.io.InputStream fromUnmarshaled​(SRC aContext, java.util.Map<java.lang.String,java.lang.String> aProperties)
      • Methods inherited from interface org.refcodes.factory.MarshalFactory

        toMarshaled, toMarshaled
      • Methods inherited from interface org.refcodes.factory.UnmarshalFactory

        toUnmarshaled, toUnmarshaled, toUnmarshaled, toUnmarshaled
    • Method Detail

      • fromMarshaled

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

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

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

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

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

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