Package org.apache.sling.distribution.journal.impl.publisher

# Class DistributionPublisher

java.lang.Object
org.apache.sling.distribution.journal.impl.publisher.DistributionPublisher

All Implemented Interfaces:
  `org.apache.sling.distribution.agent.spi.DistributionAgent`

@ParametersAreNonnullByDefault public class DistributionPublisher extends Object implements org.apache.sling.distribution.agent.spi.DistributionAgent
A Publisher SCD agent which produces messages to be consumed by a `DistributionSubscriber` agent.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`FACTORY_PID`

## Constructor Summary

Constructors
Constructor
Description
`DistributionPublisher(org.apache.sling.distribution.journal.MessagingProvider messagingProvider, org.apache.sling.distribution.packaging.DistributionPackageBuilder packageBuilder, DiscoveryService discoveryService, PackageMessageFactory factory, org.osgi.service.event.EventAdmin eventAdmin, Topics topics, org.apache.sling.commons.metrics.MetricsService metricsService, PubQueueProvider pubQueueProvider, org.osgi.service.condition.Condition limitToggle, PublisherConfiguration config, org.osgi.framework.BundleContext context)`

## Method Summary

Modifier and Type
Method
Description
`void`
`deactivate()`
`org.apache.sling.distribution.DistributionResponse`
`execute(org.apache.sling.api.resource.ResourceResolver resourceResolver, org.apache.sling.distribution.DistributionRequest request)`
`org.apache.sling.distribution.log.spi.DistributionLog`
`getLog()`
`org.apache.sling.distribution.queue.spi.DistributionQueue`
`getQueue(String queueName)`
`Iterable<String>`
`getQueueNames()`
Get queue names for alive subscribed subscriber agents.
`org.apache.sling.distribution.agent.DistributionAgentState`
`getState()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### FACTORY_PID

public static final String FACTORY_PID

See Also:
  - Constant Field Values

## Constructor Details

### DistributionPublisher

public DistributionPublisher(org.apache.sling.distribution.journal.MessagingProvider messagingProvider, org.apache.sling.distribution.packaging.DistributionPackageBuilder packageBuilder, DiscoveryService discoveryService, PackageMessageFactory factory, org.osgi.service.event.EventAdmin eventAdmin, Topics topics, org.apache.sling.commons.metrics.MetricsService metricsService, PubQueueProvider pubQueueProvider, org.osgi.service.condition.Condition limitToggle, PublisherConfiguration config, org.osgi.framework.BundleContext context)

## Method Details

### deactivate

public void deactivate()

### getQueueNames

@Nonnull public Iterable<String> getQueueNames()
Get queue names for alive subscribed subscriber agents.

Specified by:
  `getQueueNames` in interface `org.apache.sling.distribution.agent.spi.DistributionAgent`

### getQueue

public org.apache.sling.distribution.queue.spi.DistributionQueue getQueue(String queueName)

Specified by:
  `getQueue` in interface `org.apache.sling.distribution.agent.spi.DistributionAgent`

### getLog

@Nonnull public org.apache.sling.distribution.log.spi.DistributionLog getLog()

Specified by:
  `getLog` in interface `org.apache.sling.distribution.agent.spi.DistributionAgent`

### getState

@Nonnull public org.apache.sling.distribution.agent.DistributionAgentState getState()

Specified by:
  `getState` in interface `org.apache.sling.distribution.agent.spi.DistributionAgent`

### execute

@Nonnull public org.apache.sling.distribution.DistributionResponse execute(org.apache.sling.api.resource.ResourceResolver resourceResolver, org.apache.sling.distribution.DistributionRequest request) throws org.apache.sling.distribution.common.DistributionException

Specified by:
  `execute` in interface `org.apache.sling.distribution.agent.spi.DistributionAgent`
Throws:
  `org.apache.sling.distribution.common.DistributionException`