Package org.apache.tomcat.websocket
Class Util.DecoderMatch
- java.lang.Object
-
- org.apache.tomcat.websocket.Util.DecoderMatch
-
- Enclosing class:
- Util
public static class Util.DecoderMatch extends java.lang.ObjectHolds the result of matching decoders against a target type.
-
-
Constructor Summary
Constructors Constructor Description DecoderMatch(java.lang.Class<?> target, java.util.List<DecoderEntry> decoderEntries)Constructs a new DecoderMatch by matching decoder entries against the target type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Class<? extends Decoder>>getBinaryDecoders()Returns the list of matched binary decoders.java.lang.Class<?>getTarget()Returns the target type that decoders were matched against.java.util.List<java.lang.Class<? extends Decoder>>getTextDecoders()Returns the list of matched text decoders.booleanhasMatches()Returns whether any decoders matched the target type.
-
-
-
Constructor Detail
-
DecoderMatch
public DecoderMatch(java.lang.Class<?> target, java.util.List<DecoderEntry> decoderEntries)Constructs a new DecoderMatch by matching decoder entries against the target type.- Parameters:
target- The target type to match decoders againstdecoderEntries- The available decoder entries- Throws:
java.lang.IllegalArgumentException- If an unknown decoder type is encountered
-
-
Method Detail
-
getTextDecoders
public java.util.List<java.lang.Class<? extends Decoder>> getTextDecoders()
Returns the list of matched text decoders.- Returns:
- the list of text decoder classes
-
getBinaryDecoders
public java.util.List<java.lang.Class<? extends Decoder>> getBinaryDecoders()
Returns the list of matched binary decoders.- Returns:
- the list of binary decoder classes
-
getTarget
public java.lang.Class<?> getTarget()
Returns the target type that decoders were matched against.- Returns:
- the target type
-
hasMatches
public boolean hasMatches()
Returns whether any decoders matched the target type.- Returns:
trueif there are matching text or binary decoders,falseotherwise
-
-