Class HtmlMediaTypeFactory

    • Constructor Detail

      • HtmlMediaTypeFactory

        public HtmlMediaTypeFactory​()
    • Method Detail

      • getMediaTypes

        public MediaType[] getMediaTypes​()
        Retrieves the Media-Types from the Media-Types property.
        Specified by:
        getMediaTypes in interface MediaTypesAccessor
        Returns:
        The Media-Types stored by the Media-Types property.
      • toMarshaled

        public <SRC> String toMarshaled​(SRC aContext)
                                 throws org.refcodes.exception.MarshalException
        Specified by:
        toMarshaled in interface org.refcodes.factory.MarshalFactory<String>
        Throws:
        org.refcodes.exception.MarshalException
      • toMarshaled

        public <SRC> String toMarshaled​(SRC aObject,
                                        Map<String,String> aProperties)
                                 throws org.refcodes.exception.MarshalException
        Specified by:
        toMarshaled in interface org.refcodes.factory.MarshalFactory<String>
        Throws:
        org.refcodes.exception.MarshalException
      • toUnmarshaled

        public <T> T toUnmarshaled​(String aContext,
                                   Class<T> aType)
                            throws org.refcodes.exception.UnmarshalException
        Specified by:
        toUnmarshaled in interface org.refcodes.factory.UnmarshalFactory<String>
        Throws:
        org.refcodes.exception.UnmarshalException
      • toUnmarshaled

        public <T> T toUnmarshaled​(String aHttpBody,
                                   Class<T> aType,
                                   Map<String,String> aProperties)
                            throws org.refcodes.exception.UnmarshalException
        Specified by:
        toUnmarshaled in interface org.refcodes.factory.UnmarshalFactory<String>
        Throws:
        org.refcodes.exception.UnmarshalException
      • fromMarshaled

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

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