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 (Decoder
orEncoder
M
- 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 TypeMethodDescriptionvoid
Coder Specific discovery of Metadata for a specific coder.getList()
private Integer
getMetadataByAssignableType
(Class<?> type) getMetadataByImplementation
(Class<? extends T> clazz) getMetadataByType
(Class<?> type) iterator()
toString()
protected void
trackMetadata
(List<M> metadatas) protected void
trackMetadata
(M metadata) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
metadatas
Collection of metadatas -
coders
Collection of declared Coder classes -
typeMap
Mapping of supported Type to metadata list index -
implMap
Mapping of Coder class to list of supported metadata
-
-
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
-