public class KafkaConfigServiceImpl extends DefaultComponent implements KafkaConfigService
Modifier and Type | Field and Description |
---|---|
static int |
APPLICATION_STARTED_ORDER |
protected Map<String,KafkaConfigDescriptor> |
configs |
static String |
KAFKA_CONFIG_XP |
lastModified
Constructor and Description |
---|
KafkaConfigServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
protected void |
checkConfigName(String configName) |
void |
deactivate(ComponentContext context)
Deactivates the component.
|
int |
getApplicationStartedOrder()
The component notification order for
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext) . |
Properties |
getConsumerProperties(String configName)
Returns the kafka consumer properties for a configuration.
|
Properties |
getProducerProperties(String configName)
Returns the Kafka producer properties for a configuration.
|
String |
getTopicPrefix(String configName)
Returns the topic prefix to use for a configuration.
|
String |
getZkServers(String configName)
Returns the Zookeeper servers for a configuration.
|
Set<String> |
listConfigNames()
List the name of the registered Kafka configuration.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterContribution, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted
public static final String KAFKA_CONFIG_XP
public static final int APPLICATION_STARTED_ORDER
protected final Map<String,KafkaConfigDescriptor> configs
public KafkaConfigServiceImpl()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public int getApplicationStartedOrder()
Component
Component.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.
Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
getApplicationStartedOrder
in interface Component
public void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic Set<String> listConfigNames()
KafkaConfigService
listConfigNames
in interface KafkaConfigService
public String getZkServers(String configName)
KafkaConfigService
getZkServers
in interface KafkaConfigService
protected void checkConfigName(String configName)
public Properties getProducerProperties(String configName)
KafkaConfigService
getProducerProperties
in interface KafkaConfigService
public Properties getConsumerProperties(String configName)
KafkaConfigService
getConsumerProperties
in interface KafkaConfigService
public String getTopicPrefix(String configName)
KafkaConfigService
getTopicPrefix
in interface KafkaConfigService
Copyright © 2018 Nuxeo. All rights reserved.