Package org.apache.sling.distribution
Interface Distributor
@ProviderType
public interface Distributor
A distributor is responsible for dispatching DistributionRequest
s to distribution agents.
The distribution agents are executing the requests by creating packages from a source Sling instance containing content for the specified paths and then pushing and installing these on a target instance.
-
Method Summary
Modifier and TypeMethodDescriptiondistribute
(String agentName, org.apache.sling.api.resource.ResourceResolver resourceResolver, DistributionRequest distributionRequest) Perform aDistributionRequest
to distribute content from a source instance to a target instance.
-
Method Details
-
distribute
@Nonnull DistributionResponse distribute(String agentName, org.apache.sling.api.resource.ResourceResolver resourceResolver, DistributionRequest distributionRequest) Perform aDistributionRequest
to distribute content from a source instance to a target instance. The content to be sent will be assembled according to the information contained in the request. ADistributionResponse
holding theDistributionRequestState
of the provided request will be returned. Synchronous distribution agents will usually block until the execution has finished while asynchronous agents will usually return the response as soon as the content to be distributed has been assembled and scheduled for distribution.- Parameters:
agentName
- the name of the agent used to distribute the requestresourceResolver
- the resource resolver used for authorizing the request,distributionRequest
- the distribution request- Returns:
- a
DistributionResponse
-