public class KafkaConfigServiceImpl extends DefaultComponent implements KafkaConfigService
Modifier and Type | Field and Description |
---|---|
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) . |
Set<String> |
getConfigNames() |
Properties |
getConsumerProperties(String configName) |
Properties |
getProducerProperties(String configName) |
String |
getTopicPrefix(String configName) |
String |
getZkServers(String configName) |
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
protected 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> getConfigNames()
getConfigNames
in interface KafkaConfigService
public String getZkServers(String configName)
getZkServers
in interface KafkaConfigService
protected void checkConfigName(String configName)
public Properties getProducerProperties(String configName)
getProducerProperties
in interface KafkaConfigService
public Properties getConsumerProperties(String configName)
getConsumerProperties
in interface KafkaConfigService
public String getTopicPrefix(String configName)
getTopicPrefix
in interface KafkaConfigService
Copyright © 2017 Nuxeo. All rights reserved.