Package org.nuxeo.runtime.kafka
Class KafkaConfigServiceImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.runtime.kafka.KafkaConfigServiceImpl
-
- All Implemented Interfaces:
KafkaConfigService,Adaptable,Component,Extensible,TimestampedService
public class KafkaConfigServiceImpl extends DefaultComponent implements KafkaConfigService
-
-
Field Summary
Fields Modifier and Type Field Description static intAPPLICATION_STARTED_ORDERprotected static StringDEFAULT_BOOTSTRAP_SERVERSprotected static longSTART_STAMPstatic StringXP_KAFKA_CONFIG-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description KafkaConfigServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertiesgetAdminProperties(String configName)Returns the Kafka admin properties for a configuration.intgetApplicationStartedOrder()The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext).PropertiesgetConsumerProperties(String configName)Returns the Kafka consumer properties for a configuration.protected KafkaConfigDescriptorgetDescriptor(String configName)PropertiesgetProducerProperties(String configName)Returns the Kafka producer properties for a configuration.StringgetTopicPrefix(String configName)Returns the topic prefix to use for a configuration.Set<String>listConfigNames()List the name of the registered Kafka configuration.voidstart(ComponentContext context)Start the component.-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterContribution, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted
-
-
-
-
Field Detail
-
XP_KAFKA_CONFIG
public static final String XP_KAFKA_CONFIG
- See Also:
- Constant Field Values
-
APPLICATION_STARTED_ORDER
public static final int APPLICATION_STARTED_ORDER
- See Also:
- Constant Field Values
-
DEFAULT_BOOTSTRAP_SERVERS
protected static final String DEFAULT_BOOTSTRAP_SERVERS
- See Also:
- Constant Field Values
-
START_STAMP
protected static final long START_STAMP
-
-
Method Detail
-
getApplicationStartedOrder
public int getApplicationStartedOrder()
Description copied from interface:ComponentThe component notification order forComponent.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.
- Specified by:
getApplicationStartedOrderin interfaceComponent- Returns:
- the order, 1000 by default
-
start
public void start(ComponentContext context)
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
listConfigNames
public Set<String> listConfigNames()
Description copied from interface:KafkaConfigServiceList the name of the registered Kafka configuration.- Specified by:
listConfigNamesin interfaceKafkaConfigService
-
getProducerProperties
public Properties getProducerProperties(String configName)
Description copied from interface:KafkaConfigServiceReturns the Kafka producer properties for a configuration.- Specified by:
getProducerPropertiesin interfaceKafkaConfigService
-
getConsumerProperties
public Properties getConsumerProperties(String configName)
Description copied from interface:KafkaConfigServiceReturns the Kafka consumer properties for a configuration.- Specified by:
getConsumerPropertiesin interfaceKafkaConfigService
-
getTopicPrefix
public String getTopicPrefix(String configName)
Description copied from interface:KafkaConfigServiceReturns the topic prefix to use for a configuration.- Specified by:
getTopicPrefixin interfaceKafkaConfigService
-
getAdminProperties
public Properties getAdminProperties(String configName)
Description copied from interface:KafkaConfigServiceReturns the Kafka admin properties for a configuration.- Specified by:
getAdminPropertiesin interfaceKafkaConfigService
-
getDescriptor
protected KafkaConfigDescriptor getDescriptor(String configName)
-
-