Class SourceProvider<T>

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>

    @Provider
    @Produces({"application/xml","application/*+xml","text/xml"})
    @Consumes({"application/xml","application/*+xml","text/xml","text/html"})
    public class SourceProvider<T>
    extends AbstractConfigurableProvider
    implements javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
    • Constructor Detail

      • SourceProvider

        public SourceProvider()
    • Method Detail

      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mt)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<T>
      • isReadable

        public boolean isReadable​(Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mt)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<T>
      • getSize

        public long getSize​(T source,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mt)
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<T>
      • getPreferredSource

        protected String getPreferredSource()