Class AbstractProvider<T>

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractProvider()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      abstract long getSize​(T object, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Deprecated.
      Returns the size of the given objects.
      boolean isReadable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Deprecated.
       
      boolean isWriteable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Deprecated.
       
      protected static java.io.IOException logAndIOExc​(java.util.logging.Logger logger, java.lang.String message, java.lang.Throwable exc)
      Deprecated.
      Logs the problem and throws an IOException.
      abstract T readFrom​(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpResponseHeaders, java.io.InputStream entityStream)
      Deprecated.
       
      protected java.lang.Class<?> supportedClass()
      Deprecated.
      Returns the class object supported by this provider.
      abstract void writeTo​(T object, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractProvider

        public AbstractProvider()
        Deprecated.
    • Method Detail

      • logAndIOExc

        protected static java.io.IOException logAndIOExc​(java.util.logging.Logger logger,
                                                         java.lang.String message,
                                                         java.lang.Throwable exc)
                                                  throws java.io.IOException
        Deprecated.
        Logs the problem and throws an IOException.
        Parameters:
        logger -
        message -
        exc -
        Throws:
        java.io.IOException
      • getSize

        public abstract long getSize​(T object,
                                     java.lang.Class<?> type,
                                     java.lang.reflect.Type genericType,
                                     java.lang.annotation.Annotation[] annotations,
                                     javax.ws.rs.core.MediaType mediaType)
        Deprecated.
        Returns the size of the given objects.
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<T>
        Parameters:
        object - the object to check the size
        Returns:
        the size of the object, or -1, if it is not direct readable from the object.
        See Also:
        MessageBodyWriter.getSize(Object, Class, Type, Annotation[], MediaType)
      • isReadable

        public boolean isReadable​(java.lang.Class<?> type,
                                  java.lang.reflect.Type genericType,
                                  java.lang.annotation.Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Deprecated.
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<T>
      • isWriteable

        public boolean isWriteable​(java.lang.Class<?> type,
                                   java.lang.reflect.Type genericType,
                                   java.lang.annotation.Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Deprecated.
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<T>
      • readFrom

        public abstract T readFrom​(java.lang.Class<T> type,
                                   java.lang.reflect.Type genericType,
                                   java.lang.annotation.Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType,
                                   javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> httpResponseHeaders,
                                   java.io.InputStream entityStream)
                            throws java.io.IOException
        Deprecated.
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<T>
        Parameters:
        genericType - The generic Type to convert to.
        annotations - the annotations of the artefact to convert to
        Throws:
        java.io.IOException
        See Also:
        javax.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class, javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.InputStream)
      • supportedClass

        protected java.lang.Class<?> supportedClass()
        Deprecated.
        Returns the class object supported by this provider.
        Returns:
        the class object supported by this provider.
      • writeTo

        public abstract void writeTo​(T object,
                                     java.lang.Class<?> type,
                                     java.lang.reflect.Type genericType,
                                     java.lang.annotation.Annotation[] annotations,
                                     javax.ws.rs.core.MediaType mediaType,
                                     javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.Object> httpHeaders,
                                     java.io.OutputStream entityStream)
                              throws java.io.IOException
        Deprecated.
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<T>
        Throws:
        java.io.IOException
        See Also:
        MessageBodyWriter.writeTo(Object, Class, Type, Annotation[], MediaType, MultivaluedMap, OutputStream)