public interface DistributionAgent
DistributionRequest
s.
This means executing actions of e.g.: a specific DistributionRequestType
s on
specific path(s) which will resume pulling resources from a certain Sling instance and / or pushing resources to
other instances.Modifier and Type | Method and Description |
---|---|
org.apache.sling.distribution.DistributionResponse |
execute(org.apache.sling.api.resource.ResourceResolver resourceResolver,
org.apache.sling.distribution.DistributionRequest distributionRequest)
Perform a
DistributionRequest to distribute content from a source
instance to a target instance. |
DistributionLog |
getLog()
Get the agent log
|
DistributionQueue |
getQueue(String name)
Get the agent queue with the given name
|
Iterable<String> |
getQueueNames()
Retrieves the names of the queues for this agent.
|
DistributionAgentState |
getState()
returns the state of the agent
|
@Nonnull Iterable<String> getQueueNames()
@CheckForNull DistributionQueue getQueue(@Nonnull String name)
name
- a queue nameDistributionQueue
with the given name bound to this agent, if it exists,
null
otherwise@Nonnull DistributionLog getLog()
@Nonnull DistributionAgentState getState()
@Nonnull org.apache.sling.distribution.DistributionResponse execute(@Nonnull org.apache.sling.api.resource.ResourceResolver resourceResolver, @Nonnull org.apache.sling.distribution.DistributionRequest distributionRequest) throws DistributionException
DistributionRequest
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.
A DistributionResponse
holding the DistributionRequestState
of the provided request will be returned.
Synchronous DistributionAgent
s 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.distributionRequest
- the distribution requestresourceResolver
- the resource resolver used for authorizing the request,DistributionResponse
DistributionException
- if any error happens during the execution of the request or if the authentication failsCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.