com.netflix.eventbus.spi
Interface SubscriberConfigProvider


public interface SubscriberConfigProvider

A contract to handle dynamic subscriber configuration. Since, any configuration provided by Subscribe annotation is inherently compile-time & constant, in cases where the configurations are to be taken from a property file for instance, a subscriber must implement this interface and provide dynamic configurations.
These configurations will be used once & only once by eventbus at the time the subscriber is registered.
All the subscriber methods in a class can be configured using this provider, by pinning a configuration to a key which is attached to a subscriber method by the property Subscribe.name().
For a subscriber that implements interface, for any subscriber method, eventbus follows the following order to get the configuration for that subscriber method:


Nested Class Summary
static interface SubscriberConfigProvider.SubscriberConfig
          Configuration for a subscriber.
 
Method Summary
 SubscriberConfigProvider.SubscriberConfig getConfigForName(java.lang.String subscriberName)
          Returns the configuration for the passed subscriber name.
 

Method Detail

getConfigForName

@Nullable
SubscriberConfigProvider.SubscriberConfig getConfigForName(java.lang.String subscriberName)
Returns the configuration for the passed subscriber name.

Parameters:
subscriberName - Name of the subscriber.
Returns:
The configuration or null if the configuration for that subscriber is not supplied by this provider.