Class CoderMetadataSet<T, M extends CoderMetadata<T>>
java.lang.Object
org.eclipse.jetty.websocket.jsr356.metadata.CoderMetadataSet<T,M>
- Type Parameters:
T- The type of coder (DecoderorEncoderM- The metadata for the coder
- All Implemented Interfaces:
Iterable<M>
- Direct Known Subclasses:
DecoderMetadataSet, EncoderMetadataSet
public abstract class CoderMetadataSet<T, M extends CoderMetadata<T>>
extends Object
implements Iterable<M>
An durable collection of
CoderMetadata.
This is a write-only collection, and cannot be modified once initialized.
-
Field Summary
FieldsModifier and TypeFieldDescriptionCollection of declared Coder classesMapping of Coder class to list of supported metadataCollection of metadatasMapping of supported Type to metadata list index -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCoder Specific discovery of Metadata for a specific coder.getList()private IntegergetMetadataByAssignableType(Class<?> type) getMetadataByImplementation(Class<? extends T> clazz) getMetadataByType(Class<?> type) iterator()toString()protected voidtrackMetadata(List<M> metadatas) protected voidtrackMetadata(M metadata) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
metadatas
Collection of metadatas -
coders
-
typeMap
-
implMap
-
-
Constructor Details
-
CoderMetadataSet
protected CoderMetadataSet()
-
-
Method Details
-
add
-
addAll
-
addAll
-
discover
Coder Specific discovery of Metadata for a specific coder.- Parameters:
coder- the coder to discover metadata in.- Returns:
- the list of metadata discovered
- Throws:
InvalidWebSocketException- if unable to discover some metadata. Sucha as: a duplicateCoderMetadata.getObjectType()encountered, , or if unable to find the concrete generic class reference for the coder, or if the provided coder is not valid per spec.
-
getCoder
-
getList
-
getMetadataByImplementation
-
getMetadataByType
-
getMetadataByAssignableType
-
iterator
-
toString
-
trackMetadata
-
trackMetadata
-