Package org.apache.sling.event.impl.jobs

# Class JobConsumerManager

java.lang.Object
org.apache.sling.event.impl.jobs.JobConsumerManager

public class JobConsumerManager extends Object
This component manages/keeps track of all job consumer services.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static @interface`
`JobConsumerManager.Config`
`static @interface`
`JobConsumerManager.DeprecatedConfig`

## Constructor Summary

Constructors
Constructor
Description
`JobConsumerManager()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`activate(org.osgi.framework.BundleContext bc, JobConsumerManager.Config config, JobConsumerManager.DeprecatedConfig deprecatedConfig)`
`protected void`
`bindJobConsumer(org.osgi.framework.ServiceReference<org.apache.sling.event.jobs.consumer.JobConsumer> serviceReference)`
Bind a new consumer
`protected void`
`bindJobExecutor(org.osgi.framework.ServiceReference<org.apache.sling.event.jobs.consumer.JobExecutor> serviceReference)`
Bind a new executor
`protected void`
`deactivate()`
`org.apache.sling.event.jobs.consumer.JobExecutor`
`getExecutor(String topic)`
Get the executor for the topic.
`String`
`getTopics()`
Return the topics information of this instance.
`protected void`
`modified(org.osgi.framework.BundleContext bc, JobConsumerManager.Config config, JobConsumerManager.DeprecatedConfig deprecatedConfig)`
`void`
`registerListener(String key, org.apache.sling.event.jobs.consumer.JobExecutor consumer, org.apache.sling.event.jobs.consumer.JobExecutionContext handler)`
`protected void`
`unbindJobConsumer(org.osgi.framework.ServiceReference<org.apache.sling.event.jobs.consumer.JobConsumer> serviceReference)`
Unbind a consumer
`protected void`
`unbindJobExecutor(org.osgi.framework.ServiceReference<org.apache.sling.event.jobs.consumer.JobExecutor> serviceReference)`
Unbind a executor
`void`
`unregisterListener(String key)`

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

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

## Constructor Details

### JobConsumerManager

public JobConsumerManager()

## Method Details

### activate

protected void activate(org.osgi.framework.BundleContext bc, JobConsumerManager.Config config, JobConsumerManager.DeprecatedConfig deprecatedConfig)

### modified

protected void modified(org.osgi.framework.BundleContext bc, JobConsumerManager.Config config, JobConsumerManager.DeprecatedConfig deprecatedConfig)

### deactivate

protected void deactivate()

### getExecutor

public org.apache.sling.event.jobs.consumer.JobExecutor getExecutor(String topic)
Get the executor for the topic.

Parameters:
  `topic` - The job topic
Returns:
  A consumer or `null`

### registerListener

public void registerListener(String key, org.apache.sling.event.jobs.consumer.JobExecutor consumer, org.apache.sling.event.jobs.consumer.JobExecutionContext handler)

### unregisterListener

public void unregisterListener(String key)

### getTopics

public String getTopics()
Return the topics information of this instance.

### bindJobConsumer

protected void bindJobConsumer(org.osgi.framework.ServiceReference<org.apache.sling.event.jobs.consumer.JobConsumer> serviceReference)
Bind a new consumer

Parameters:
  `serviceReference` - The service reference to the consumer.

### unbindJobConsumer

protected void unbindJobConsumer(org.osgi.framework.ServiceReference<org.apache.sling.event.jobs.consumer.JobConsumer> serviceReference)
Unbind a consumer

Parameters:
  `serviceReference` - The service reference to the consumer.

### bindJobExecutor

protected void bindJobExecutor(org.osgi.framework.ServiceReference<org.apache.sling.event.jobs.consumer.JobExecutor> serviceReference)
Bind a new executor

Parameters:
  `serviceReference` - The service reference to the executor.

### unbindJobExecutor

protected void unbindJobExecutor(org.osgi.framework.ServiceReference<org.apache.sling.event.jobs.consumer.JobExecutor> serviceReference)
Unbind a executor

Parameters:
  `serviceReference` - The service reference to the executor.