Package com.io7m.coffeepick.runtime.parser.api

# Class CoffeePickSerializersOSGi

java.lang.Object
com.io7m.coffeepick.runtime.parser.api.CoffeePickSerializersOSGi

All Implemented Interfaces:
  `CoffeePickSerializersType`

    public final class CoffeePickSerializersOSGi
    extends java.lang.Object
    implements CoffeePickSerializersType

The OSGi implementation of the `CoffeePickSerializersType` interface.

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `CoffeePickSerializersOSGi()` | Construct a parser provider.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `CoffeePickSerializerType` | `createSerializer​(FormatDescription format, FormatVersion version, java.io.OutputStream output)` | Create a new serializer.
  `java.util.Optional<FormatDescription>` | `findFormat​(java.net.URI format)` | Find the format with the given name.
  `java.util.SortedSet<FormatVersion>` | `findSupportedVersions​(FormatDescription format)` |
  `void` | `onSerializerProviderAvailable​(SPISerializerProviderType provider)` | A serializer provider has become available.
  `void` | `onSerializerProviderUnavailable​(SPISerializerProviderType provider)` | A serializer provider has become unavailable.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CoffeePickSerializersOSGi

    public CoffeePickSerializersOSGi()
    Construct a parser provider.

- ## Method Details

  - ### onSerializerProviderAvailable

    public void onSerializerProviderAvailable​(SPISerializerProviderType provider)
    A serializer provider has become available.
    Parameters:
      `provider` - The provider

  - ### onSerializerProviderUnavailable

    public void onSerializerProviderUnavailable​(SPISerializerProviderType provider)
    A serializer provider has become unavailable.
    Parameters:
      `provider` - The provider

  - ### findSupportedVersions

    public java.util.SortedSet<FormatVersion> findSupportedVersions​(FormatDescription format)
    Specified by:
      `findSupportedVersions` in interface `CoffeePickSerializersType`
    Parameters:
      `format` - The output format
    Returns:
      The supported versions of the given format, if any

  - ### findFormat

    public java.util.Optional<FormatDescription> findFormat​(java.net.URI format)
    Description copied from interface: `CoffeePickSerializersType`
    Find the format with the given name.
    Specified by:
      `findFormat` in interface `CoffeePickSerializersType`
    Parameters:
      `format` - The format name
    Returns:
      The format description if one exists

  - ### createSerializer

    public CoffeePickSerializerType createSerializer​(FormatDescription format, FormatVersion version, java.io.OutputStream output) throws java.io.IOException
    Description copied from interface: `CoffeePickSerializersType`
    Create a new serializer.
    Specified by:
      `createSerializer` in interface `CoffeePickSerializersType`
    Parameters:
      `format` - The output format
      `version` - The output format version
      `output` - The output stream
    Returns:
      A new serializer
    Throws:
      `java.io.IOException` - On I/O errors