Class CatalogRequestHttpDelegate
java.lang.Object
org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate<org.eclipse.edc.catalog.spi.CatalogRequestMessage,org.eclipse.edc.catalog.spi.Catalog>
org.eclipse.edc.protocol.dsp.catalog.dispatcher.delegate.CatalogRequestHttpDelegate
public class CatalogRequestHttpDelegate
extends org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate<org.eclipse.edc.catalog.spi.CatalogRequestMessage,org.eclipse.edc.catalog.spi.Catalog>
Delegate for dispatching catalog requests as defined in the dataspace protocol specification.
-
Constructor Summary
ConstructorsConstructorDescriptionCatalogRequestHttpDelegate(org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer serializer, com.fasterxml.jackson.databind.ObjectMapper mapper, org.eclipse.edc.transform.spi.TypeTransformerRegistry transformerRegistry, org.eclipse.edc.jsonld.spi.JsonLd jsonLdService) -
Method Summary
Modifier and TypeMethodDescriptionokhttp3.RequestbuildRequest(org.eclipse.edc.catalog.spi.CatalogRequestMessage message) Sends a catalog request.Class<org.eclipse.edc.catalog.spi.CatalogRequestMessage>Function<okhttp3.Response,org.eclipse.edc.catalog.spi.Catalog> Parses the response to a catalog request.Methods inherited from class org.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate
buildRequest, handleResponse
-
Constructor Details
-
CatalogRequestHttpDelegate
public CatalogRequestHttpDelegate(org.eclipse.edc.protocol.dsp.spi.serialization.JsonLdRemoteMessageSerializer serializer, com.fasterxml.jackson.databind.ObjectMapper mapper, org.eclipse.edc.transform.spi.TypeTransformerRegistry transformerRegistry, org.eclipse.edc.jsonld.spi.JsonLd jsonLdService)
-
-
Method Details
-
getMessageType
- Specified by:
getMessageTypein classorg.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate<org.eclipse.edc.catalog.spi.CatalogRequestMessage,org.eclipse.edc.catalog.spi.Catalog>
-
buildRequest
public okhttp3.Request buildRequest(org.eclipse.edc.catalog.spi.CatalogRequestMessage message) Sends a catalog request. The request body is constructed as defined in the dataspace protocol implementation. The request is sent to the remote component using the path from the specification.- Specified by:
buildRequestin classorg.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate<org.eclipse.edc.catalog.spi.CatalogRequestMessage,org.eclipse.edc.catalog.spi.Catalog> - Parameters:
message- the message- Returns:
- the built okhttp request
-
parseResponse
Parses the response to a catalog request. The JSON-LD structure from the response body is expanded and then transformed to an EDC catalog.- Specified by:
parseResponsein classorg.eclipse.edc.protocol.dsp.spi.dispatcher.DspHttpDispatcherDelegate<org.eclipse.edc.catalog.spi.CatalogRequestMessage,org.eclipse.edc.catalog.spi.Catalog> - Returns:
- a function that transforms the response body to a catalog.
-