Class BusConfiguration

    • Field Detail

      • properties

        private final java.util.Map<java.lang.Object,​java.lang.Object> properties
    • Constructor Detail

      • BusConfiguration

        public BusConfiguration()
    • Method Detail

      • setProperty

        public IBusConfiguration setProperty​(java.lang.String name,
                                             java.lang.Object value)
        Description copied from interface: IBusConfiguration
        Set a property which will be read by the message bus constructor. Existing value will be overwritten. Null values are supported (checking for existence of property will return true even if set to null).
        Specified by:
        setProperty in interface IBusConfiguration
        Parameters:
        name - The name of the property. Note: Each implementation may support different properties.
        value - The value of the property.
        Returns:
        A reference to this bus configuration.
      • getProperty

        public <T> T getProperty​(java.lang.String name,
                                 T defaultValue)
        Description copied from interface: IBusConfiguration
        Read a property from this configuration.
        Specified by:
        getProperty in interface IBusConfiguration
        Type Parameters:
        T - The type of property
        Parameters:
        name - The name of the property to be read.
        defaultValue - The value to be returned if property was not found
        Returns:
        The value associated with the given property name or defaultValue if not present
      • hasProperty

        public boolean hasProperty​(java.lang.String name)
        Description copied from interface: IBusConfiguration
        Check whether a property has been set.
        Specified by:
        hasProperty in interface IBusConfiguration
        Returns:
        true if property was set (even if set to null) false otherwise
      • addFeature

        public IBusConfiguration addFeature​(Feature feature)
        Description copied from interface: IBusConfiguration
        Add a feature to the given configuration, replacing any existing feature of the same type.
        Specified by:
        addFeature in interface IBusConfiguration
        Parameters:
        feature - The feature to add
        Returns:
        A reference to this bus configuration.