public class WebClientExternalSystemContentProvider extends Object implements ExternalSystemContentProvider
ExternalSystemContentProvider that uses WebClient to fetch the external content.| Modifier and Type | Field and Description |
|---|---|
protected String |
externalSystemId |
protected org.springframework.web.reactive.function.client.WebClient |
webClient |
| Constructor and Description |
|---|
WebClientExternalSystemContentProvider(String externalSystemId,
org.springframework.web.reactive.function.client.WebClient webClient)
Create a new
ExternalSystemContentProvider that uses a preconfigured WebClient
with the path to the external content resource. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<? extends org.springframework.core.io.Resource>> |
getContentData(String businessAccountId,
String externalMediaId)
Fetch the external media from the external system.
|
String |
getExternalSystemId()
Returns the id of the external system implemented by this adapter.
|
protected final String externalSystemId
protected final org.springframework.web.reactive.function.client.WebClient webClient
public WebClientExternalSystemContentProvider(String externalSystemId, org.springframework.web.reactive.function.client.WebClient webClient)
ExternalSystemContentProvider that uses a preconfigured WebClient
with the path to the external content resource.
The requests will be issued by suffixing the businessAccountId and / or the externalMediaIdexternalSystemId - the id of the external systemwebClient - the preconfigured WebClientpublic String getExternalSystemId()
ExternalSystemContentProvidergetExternalSystemId in interface ExternalSystemContentProviderpublic reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<? extends org.springframework.core.io.Resource>> getContentData(String businessAccountId, String externalMediaId)
ExternalSystemContentProvidergetContentData in interface ExternalSystemContentProviderbusinessAccountId - the id of the business accountexternalMediaId - the id of the contentCopyright © 2019. All rights reserved.