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
`static String` `FACTORY_PID`

### Constructor Summary

Constructors
`DistributionPublisher()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `activate​(PublisherConfiguration config, org.osgi.framework.BundleContext context)`
`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 Detail

#### FACTORY_PID

    public static final String FACTORY_PID

See Also:
  Constant Field Values

### Constructor Detail

#### DistributionPublisher

    public DistributionPublisher()

### Method Detail

#### activate

    public void activate​(PublisherConfiguration config,
                         org.osgi.framework.BundleContext context)

#### 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`