Interface WotThingModelFetcher


public interface WotThingModelFetcher
Fetches WoT (Web of Things) ThingModels from IRIs/URLs, optionally caching those (as part of the implementation strategy).
Since:
2.4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    CompletionStage<org.eclipse.ditto.wot.model.ThingModel>
    fetchThingModel(URL url, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Fetches the ThingModel resource at the passed iurlri.
    CompletionStage<org.eclipse.ditto.wot.model.ThingModel>
    fetchThingModel(org.eclipse.ditto.wot.model.IRI iri, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Fetches the ThingModel resource at the passed iri.
  • Method Details

    • fetchThingModel

      CompletionStage<org.eclipse.ditto.wot.model.ThingModel> fetchThingModel(org.eclipse.ditto.wot.model.IRI iri, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Fetches the ThingModel resource at the passed iri.
      Parameters:
      iri - the IRI (URL) from which to fetch the ThingModel.
      dittoHeaders - the DittoHeaders for possibly thrown DittoRuntimeExceptions.
      Returns:
      a CompletionStage containing the fetched ThingModel or completed exceptionally with a WotThingModelInvalidException if the fetched ThingModel could not be parsed/interpreted as correct WoT ThingModel.
      Throws:
      org.eclipse.ditto.wot.model.ThingDefinitionInvalidException - if the passed iri did not contain a valid URL.
      org.eclipse.ditto.wot.model.WotThingModelNotAccessibleException - if the ThingModel could not be fetched at the given iri.
    • fetchThingModel

      CompletionStage<org.eclipse.ditto.wot.model.ThingModel> fetchThingModel(URL url, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Fetches the ThingModel resource at the passed iurlri.
      Parameters:
      url - the URL from which to fetch the ThingModel.
      dittoHeaders - the DittoHeaders for possibly thrown DittoRuntimeExceptions.
      Returns:
      a CompletionStage containing the fetched ThingModel or completed exceptionally with a WotThingModelInvalidException if the fetched ThingModel could not be parsed/interpreted as correct WoT ThingModel.
      Throws:
      org.eclipse.ditto.wot.model.WotThingModelNotAccessibleException - if the ThingModel could not be fetched at the given url.