Class CoderMetadataSet<T,​M extends CoderMetadata<T>>

  • Type Parameters:
    T - The type of coder (Decoder or Encoder
    M - The metadata for the coder
    All Implemented Interfaces:
    java.lang.Iterable<M>
    Direct Known Subclasses:
    DecoderMetadataSet, EncoderMetadataSet

    public abstract class CoderMetadataSet<T,​M extends CoderMetadata<T>>
    extends java.lang.Object
    implements java.lang.Iterable<M>
    An durable collection of CoderMetadata.

    This is a write-only collection, and cannot be modified once initialized.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CoderMetadataSet()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Class<? extends T> coder)  
      java.util.List<M> addAll​(java.lang.Class<? extends T>[] coders)  
      java.util.List<M> addAll​(java.util.List<java.lang.Class<? extends T>> coders)  
      protected abstract java.util.List<M> discover​(java.lang.Class<? extends T> coder)
      Coder Specific discovery of Metadata for a specific coder.
      java.lang.Class<? extends T> getCoder​(java.lang.Class<?> type)  
      java.util.List<java.lang.Class<? extends T>> getList()  
      java.util.List<M> getMetadataByImplementation​(java.lang.Class<? extends T> clazz)  
      M getMetadataByType​(java.lang.Class<?> type)  
      java.util.Iterator<M> iterator()  
      java.lang.String toString()  
      protected void trackMetadata​(java.util.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
    • Constructor Detail

      • CoderMetadataSet

        protected CoderMetadataSet()
    • Method Detail

      • add

        public void add​(java.lang.Class<? extends T> coder)
      • addAll

        public java.util.List<M> addAll​(java.lang.Class<? extends T>[] coders)
      • addAll

        public java.util.List<M> addAll​(java.util.List<java.lang.Class<? extends T>> coders)
      • discover

        protected abstract java.util.List<M> discover​(java.lang.Class<? extends T> coder)
        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 duplicate CoderMetadata.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

        public java.lang.Class<? extends T> getCoder​(java.lang.Class<?> type)
      • getList

        public java.util.List<java.lang.Class<? extends T>> getList()
      • getMetadataByImplementation

        public java.util.List<M> getMetadataByImplementation​(java.lang.Class<? extends T> clazz)
      • getMetadataByType

        public M getMetadataByType​(java.lang.Class<?> type)
      • iterator

        public java.util.Iterator<M> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • trackMetadata

        protected void trackMetadata​(java.util.List<M> metadatas)
      • trackMetadata

        protected void trackMetadata​(M metadata)