public class BusConfiguration extends Object implements IBusConfiguration
IBusConfiguration.Properties
Constructor and Description |
---|
BusConfiguration() |
Modifier and Type | Method and Description |
---|---|
IBusConfiguration |
addFeature(Feature feature)
Add a feature to the given configuration, replacing any existing feature of the same type.
|
BusConfiguration |
addPublicationErrorHandler(IPublicationErrorHandler handler)
Add a handler that will be called whenever a publication error occurs.
|
<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.
|
Collection<IPublicationErrorHandler> |
getRegisteredPublicationErrorHandlers()
Get an unmodifiable collection of all registered publication error handlers
|
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)
IBusConfiguration
true
even if set to null
).setProperty
in interface IBusConfiguration
name
- 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)
IBusConfiguration
getProperty
in interface IBusConfiguration
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 presentpublic boolean hasProperty(String name)
IBusConfiguration
hasProperty
in interface IBusConfiguration
public <T extends Feature> T getFeature(Class<T> feature)
IBusConfiguration
getFeature
in interface IBusConfiguration
public IBusConfiguration addFeature(Feature feature)
IBusConfiguration
addFeature
in interface IBusConfiguration
feature
- The feature to addthis
bus configuration.public final BusConfiguration addPublicationErrorHandler(IPublicationErrorHandler handler)
IBusConfiguration
PublicationError
addPublicationErrorHandler
in interface IBusConfiguration
handler
- The handler to be added to the list of handlersthis
bus configuration.public Collection<IPublicationErrorHandler> getRegisteredPublicationErrorHandlers()
IBusConfiguration
getRegisteredPublicationErrorHandlers
in interface IBusConfiguration
Copyright © 2016. All rights reserved.