Class MediaContext


  • public final class MediaContext
    extends Object
    Media support.
    • Method Detail

      • create

        public static MediaContext create()
        Create a new instance with default readers and writers registered to the contexts.
        Returns:
        instance with defaults
      • create

        public static MediaContext create​(Config config)
        Create a new instance based on the configuration.
        Parameters:
        config - a Config
        Returns:
        instance based on config
      • empty

        public static MediaContext empty()
        Creates new empty instance without registered defaults.
        Returns:
        empty instance
      • readerContext

        public MessageBodyReaderContext readerContext()
        Get the configured reader context.
        Returns:
        MessageBodyReaderContext
      • writerContext

        public MessageBodyWriterContext writerContext()
        Get the configured writer context.
        Returns:
        MessageBodyWriterContext