public interface IBusConfiguration
Feature.
Features can be added to a bus configuration to be used later in the instantiation process of the message bus.
Each bus will look for the features it requires and configure them according to the provided configuration. If a required feature is not found the bus will publish a ConfigurationError
to the ConfigurationErrorHandler| Modifier and Type | Method and Description |
|---|---|
IBusConfiguration |
addConfigurationErrorHandler(ConfigurationErrorHandler handler)
Add a handler that is called when a misconfiguration is detected.
|
IBusConfiguration |
addFeature(Feature feature)
Add a feature to the given configuration, replacing any existing feature of the same type.
|
<T extends Feature> |
getFeature(Class<T> feature)
Get a registered feature by its type (class).
|
<T> T |
getProperty(String name,
T defaultValue)
Read a property from this configuration.
|
void |
handleError(ConfigurationError error)
Calls all ConfigurationErrorHandlers
|
boolean |
hasProperty(String name)
Check whether a property has been set.
|
IBusConfiguration |
setProperty(String name,
Object value)
Set a property which will be read by the message bus constructor.
|
IBusConfiguration setProperty(String name, Object value)
true even if set to null).name - The name of the property. Note: Each implementation may support different properties.value - The value of the property.this bus configuration.<T> T getProperty(String name, T defaultValue)
T - The type of propertyname - The name of the property to be read.defaultValue - The value to be returned if property was not founddefaultValue if not presentboolean hasProperty(String name)
<T extends Feature> T getFeature(Class<T> feature)
IBusConfiguration addFeature(Feature feature)
feature - The feature to addthis bus configuration.IBusConfiguration addConfigurationErrorHandler(ConfigurationErrorHandler handler)
void handleError(ConfigurationError error)
Copyright © 2015. All rights reserved.