Class NetworkConfigEvent

    • Constructor Detail

      • NetworkConfigEvent

        public NetworkConfigEvent​(NetworkConfigEvent.Type type,
                                  Object subject,
                                  Class configClass)
        Creates an event of a given type and for the specified subject and the current time.
        Parameters:
        type - event type
        subject - event subject
        configClass - configuration class
      • NetworkConfigEvent

        public NetworkConfigEvent​(NetworkConfigEvent.Type type,
                                  Object subject,
                                  Class configClass,
                                  long time)
        Creates an event of a given type and for the specified subject and time.
        Parameters:
        type - device event type
        subject - event subject
        configClass - configuration class
        time - occurrence time
      • NetworkConfigEvent

        public NetworkConfigEvent​(NetworkConfigEvent.Type type,
                                  Object subject,
                                  Config config,
                                  Config prevConfig,
                                  Class configClass)
        Creates an event of a given type and for the specified subject, previous config and time.
        Parameters:
        type - device event type
        subject - event subject
        configClass - configuration class
        config - current config
        prevConfig - previous config
    • Method Detail

      • configClass

        public Class configClass()
        Returns the class of configuration that has been changed.
        Returns:
        configuration class
      • config

        public Optional<Config> config()
        Returns current config.
        Returns:
        current config; value presents only when the type is CONFIG_ADDED or CONFIG_UPDATED
      • prevConfig

        public Optional<Config> prevConfig()
        Returns previous config.
        Returns:
        previous config; value presents only when the type is CONFIG_UPDATED or CONFIG_REMOVED