Package com.io7m.idstore.server.internal

# Class IdVerdantMessages

java.lang.Object
com.io7m.idstore.server.internal.IdVerdantMessages

All Implemented Interfaces:
  `IdServiceType`

public final class IdVerdantMessages extends Object implements IdServiceType
Service wrapper for Verdant messages.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdVerdantMessages()`
  Service wrapper for Verdant messages.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `contentType()`
  `String`
  `description()`
  `com.io7m.verdant.core.VProtocols`
  `parse(URI source, byte[] data)`
  Parse versions from the given source.
  `byte[]`
  `serialize(com.io7m.verdant.core.VProtocols protocols, int version)`
  Serialize the given protocols.

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

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

- ## Constructor Details

  - ### IdVerdantMessages

    public IdVerdantMessages()
    Service wrapper for Verdant messages.

- ## Method Details

  - ### contentType

    public static String contentType()
    Returns:
      The content type used for versioning

  - ### serialize

    public byte[] serialize(com.io7m.verdant.core.VProtocols protocols, int version) throws com.io7m.verdant.core.VProtocolException
    Serialize the given protocols.
    Parameters:
      `protocols` - The protocols
      `version` - The container version
    Returns:
      The serialized bytes
    Throws:
      `com.io7m.verdant.core.VProtocolException` - On errors

  - ### parse

    public com.io7m.verdant.core.VProtocols parse(URI source, byte[] data) throws com.io7m.verdant.core.VProtocolException
    Parse versions from the given source.
    Parameters:
      `source` - The source
      `data` - The read bytes
    Returns:
      A set of parsed versions
    Throws:
      `com.io7m.verdant.core.VProtocolException` - If the input cannot be parsed

  - ### description

    public String description()
    Specified by:
      `description` in interface `IdServiceType`
    Returns:
      The service description