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

## Class PackageStatusWatcher

- java.lang.Object
- - org.apache.sling.distribution.journal.impl.precondition.PackageStatusWatcher

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

    public class PackageStatusWatcher
    extends Object
    implements Closeable

### Constructor Summary

Constructors
`PackageStatusWatcher​(org.apache.sling.distribution.journal.MessagingProvider messagingProvider, Topics topics)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`org.apache.sling.distribution.journal.messages.PackageStatusMessage.Status` `getStatus​(String subAgentName, long pkgOffset)` Gets the status that confirms the package at offset pkgOffset

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

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

### Constructor Detail

#### PackageStatusWatcher

    public PackageStatusWatcher​(org.apache.sling.distribution.journal.MessagingProvider messagingProvider,
                                Topics topics)

### Method Detail

#### getStatus

    public org.apache.sling.distribution.journal.messages.PackageStatusMessage.Status getStatus​(String subAgentName,
                                                                                                long pkgOffset)

Gets the status that confirms the package at offset pkgOffset

Parameters:
  `pkgOffset` - the offset of the package
Returns:
  the status confirming the package; or null if it has not been confirmed yet

#### close

    public void close()
               throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Throws:
  `IOException`