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

# Class CoffeePickParsersOSGi

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

All Implemented Interfaces:
  `CoffeePickParsersType`

    public final class CoffeePickParsersOSGi
    extends java.lang.Object
    implements CoffeePickParsersType

The OSGi implementation of the `CoffeePickParsersType` interface.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `CoffeePickParserType` | `createParser​(CoffeePickParseRequest request)` | Create a parser for the given request, probing the input stream for format information and using this to pick an appropriate parser implementation.
  `void` | `onParserProviderAvailable​(SPIParserProviderType provider)` | A parser provider has become available.
  `void` | `onParserProviderUnavailable​(SPIParserProviderType provider)` | A parser provider has become unavailable.

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

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

- ## Constructor Details

  - ### CoffeePickParsersOSGi

    public CoffeePickParsersOSGi()
    Construct a parser provider.

- ## Method Details

  - ### onParserProviderAvailable

    public void onParserProviderAvailable​(SPIParserProviderType provider)
    A parser provider has become available.
    Parameters:
      `provider` - The provider

  - ### onParserProviderUnavailable

    public void onParserProviderUnavailable​(SPIParserProviderType provider)
    A parser provider has become unavailable.
    Parameters:
      `provider` - The provider

  - ### createParser

    public CoffeePickParserType createParser​(CoffeePickParseRequest request) throws java.io.IOException, ParserFailureException
    Description copied from interface: `CoffeePickParsersType`
    Create a parser for the given request, probing the input stream for format information and using this to pick an appropriate parser implementation.
    Specified by:
      `createParser` in interface `CoffeePickParsersType`
    Parameters:
      `request` - The parse request
    Returns:
      A parser
    Throws:
      `java.io.IOException` - On I/O errors
      `ParserFailureException` - On parser configuration problems, such as there not being an available provider for the detected format