Package org.apache.sling.distribution.trigger

## Interface DistributionTrigger

    @ConsumerType
    public interface DistributionTrigger

A `DistributionTrigger` is responsible to trigger `DistributionRequest`s upon certain 'events' (e.g. Sling / Jcr events, periodic pulling, etc.). A `DistributionTrigger` is meant to be stateless so that more than one `DistributionRequestHandler` can be registered into the same trigger.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `register​(@NotNull DistributionRequestHandler requestHandler)` register a request handler to be triggered and returns a corresponding registration id
`void` `unregister​(@NotNull DistributionRequestHandler requestHandler)` unregister the given handler, if existing

### Method Detail

#### register

    void register​(@NotNull
                  @NotNull DistributionRequestHandler requestHandler)
           throws DistributionException

register a request handler to be triggered and returns a corresponding registration id

Parameters:
  `requestHandler` - handler
Throws:
  `DistributionException` - if registration fails

#### unregister

    void unregister​(@NotNull
                    @NotNull DistributionRequestHandler requestHandler)
             throws DistributionException

unregister the given handler, if existing

Parameters:
  `requestHandler` - handler to unregister
Throws:
  `DistributionException` - if any error happen