Class TextMediaTypeFactory

    • Constructor Detail

      • TextMediaTypeFactory

        public TextMediaTypeFactory​()
    • Method Detail

      • getMediaTypes

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

        public java.lang.String toMarshaled​(java.lang.Object aObject)
                                     throws org.refcodes.exception.MarshalException
        This method creates / retrieves an instance of the given type with the given identifier (name) constructed as defined in one to many configuration files. How the instance is configured, created or retrieved is up to the nature (implementation) of the according factory.
        Specified by:
        toMarshaled in interface Marshalable<java.lang.String>
        aObject - The context which may influence the object being created by this factory.
        The instance being fabricated by this factory.
        org.refcodes.exception.MarshalException - Thrown when marshaling / serializing an object fails.
      • toUnmarshaled

        public <T> T toUnmarshaled​(java.lang.String aHttpBody,
                                   java.lang.Class<T> aType)
                            throws org.refcodes.exception.UnmarshalException
        To unmarshaled.
        Specified by:
        toUnmarshaled in interface Unmarshalable<java.lang.String>
        Type Parameters:
        T - the generic type
        aHttpBody - the http body
        aType - the type
        the t
        org.refcodes.exception.UnmarshalException - the unmarshal exception