public class BusConfiguration extends Object implements IBusConfiguration
| Constructor and Description |
|---|
BusConfiguration() |
| 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.
|
public IBusConfiguration setProperty(String name, Object value)
IBusConfigurationtrue even if set to null).setProperty in interface IBusConfigurationname - The name of the property. Note: Each implementation may support different properties.value - The value of the property.this bus configuration.public <T> T getProperty(String name, T defaultValue)
IBusConfigurationgetProperty in interface IBusConfigurationT - 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 presentpublic boolean hasProperty(String name)
IBusConfigurationhasProperty in interface IBusConfigurationpublic <T extends Feature> T getFeature(Class<T> feature)
IBusConfigurationgetFeature in interface IBusConfigurationpublic IBusConfiguration addFeature(Feature feature)
IBusConfigurationaddFeature in interface IBusConfigurationfeature - The feature to addthis bus configuration.public IBusConfiguration addConfigurationErrorHandler(ConfigurationErrorHandler handler)
IBusConfigurationaddConfigurationErrorHandler in interface IBusConfigurationpublic void handleError(ConfigurationError error)
IBusConfigurationhandleError in interface IBusConfigurationCopyright © 2015. All rights reserved.