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 int
APPLICATION_STARTED_ORDER
protected static String
DEFAULT_BOOTSTRAP_SERVERS
protected static long
START_STAMP
static String
XP_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 Properties
getAdminProperties(String configName)
Returns the Kafka admin properties for a configuration.int
getApplicationStartedOrder()
The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.Properties
getConsumerProperties(String configName)
Returns the Kafka consumer properties for a configuration.protected KafkaConfigDescriptor
getDescriptor(String configName)
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.Set<String>
listConfigNames()
List the name of the registered Kafka configuration.void
start(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:Component
The 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:
getApplicationStartedOrder
in interfaceComponent
- Returns:
- the order, 1000 by default
-
start
public void start(ComponentContext context)
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
listConfigNames
public Set<String> listConfigNames()
Description copied from interface:KafkaConfigService
List the name of the registered Kafka configuration.- Specified by:
listConfigNames
in interfaceKafkaConfigService
-
getProducerProperties
public Properties getProducerProperties(String configName)
Description copied from interface:KafkaConfigService
Returns the Kafka producer properties for a configuration.- Specified by:
getProducerProperties
in interfaceKafkaConfigService
-
getConsumerProperties
public Properties getConsumerProperties(String configName)
Description copied from interface:KafkaConfigService
Returns the Kafka consumer properties for a configuration.- Specified by:
getConsumerProperties
in interfaceKafkaConfigService
-
getTopicPrefix
public String getTopicPrefix(String configName)
Description copied from interface:KafkaConfigService
Returns the topic prefix to use for a configuration.- Specified by:
getTopicPrefix
in interfaceKafkaConfigService
-
getAdminProperties
public Properties getAdminProperties(String configName)
Description copied from interface:KafkaConfigService
Returns the Kafka admin properties for a configuration.- Specified by:
getAdminProperties
in interfaceKafkaConfigService
-
getDescriptor
protected KafkaConfigDescriptor getDescriptor(String configName)
-
-