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 TypeMethodDescriptionCompletionStage<org.eclipse.ditto.wot.model.ThingModel>fetchThingModel(URL url, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Fetches the ThingModel resource at the passediurlri.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 passediri.
-
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 passediri.- 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
WotThingModelInvalidExceptionif the fetched ThingModel could not be parsed/interpreted as correct WoT ThingModel. - Throws:
org.eclipse.ditto.wot.model.ThingDefinitionInvalidException- if the passediridid not contain a valid URL.org.eclipse.ditto.wot.model.WotThingModelNotAccessibleException- if the ThingModel could not be fetched at the giveniri.
-
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 passediurlri.- 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
WotThingModelInvalidExceptionif 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 givenurl.
-