Class OneToManyTranscoder

java.lang.Object
org.infinispan.commons.dataconversion.AbstractTranscoder
org.infinispan.commons.dataconversion.OneToManyTranscoder
All Implemented Interfaces:
Transcoder
Direct Known Subclasses:
BinaryTranscoder, TranscoderMarshallerAdapter

public abstract class OneToManyTranscoder extends AbstractTranscoder
Base class for Transcoder that converts between a single format and multiple other formats and back.
  • Field Details

    • mainType

      protected final MediaType mainType
    • supportedTypes

      protected final Set<MediaType> supportedTypes
  • Constructor Details

    • OneToManyTranscoder

      public OneToManyTranscoder(MediaType mainType, MediaType... supportedConversions)
  • Method Details

    • getSupportedMediaTypes

      public Set<MediaType> getSupportedMediaTypes()
      Returns:
      all the MediaType handled by this Transcoder.
    • supportsConversion

      public boolean supportsConversion(MediaType mediaType, MediaType other)
      Returns:
      true if the transcoder supports the conversion between the supplied MediaTypes.