Class ResourceReader.ResourceReaderComparator
java.lang.Object
org.jboss.resteasy.reactive.common.model.ResourceReader.ResourceReaderComparator
- All Implemented Interfaces:
Comparator<ResourceReader>
- Enclosing class:
ResourceReader
public static class ResourceReader.ResourceReaderComparator
extends Object
implements Comparator<ResourceReader>
The comparison for now is simple:
1) Application provided writers come first
2) Readers with lower priority come first (same as reader interceptors)
3) Then the more specific the media type, the higher the priority
4) Finally we compare the number of media types
The spec doesn't seem to mention this sorting being explicitly needed, but there are tests
in the TCK that only pass reliably if the Readers are sorted like this
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ResourceReaderComparator
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<ResourceReader>
-