Class PropertySourceChangedEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class PropertySourceChangedEvent
    extends org.springframework.context.event.ApplicationContextEvent
    The event raised when one single PropertySource is changed
    Since:
    1.0.0
    Author:
    Mercy
    See Also:
    PropertySource, Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  PropertySourceChangedEvent.Kind
      The Kind of PropertySource Changed Event
    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static PropertySourceChangedEvent added​(org.springframework.context.ApplicationContext source, org.springframework.core.env.PropertySource newPropertySource)
      Create an added instance
      PropertySourceChangedEvent.Kind getKind()  
      org.springframework.core.env.PropertySource getNewPropertySource()  
      org.springframework.core.env.PropertySource getOldPropertySource()  
      static PropertySourceChangedEvent removed​(org.springframework.context.ApplicationContext source, org.springframework.core.env.PropertySource oldPropertySource)
      Create an removed instance
      static PropertySourceChangedEvent replaced​(org.springframework.context.ApplicationContext source, org.springframework.core.env.PropertySource newPropertySource, org.springframework.core.env.PropertySource oldPropertySource)
      Create an replaced instance
      • Methods inherited from class org.springframework.context.event.ApplicationContextEvent

        getApplicationContext
      • Methods inherited from class org.springframework.context.ApplicationEvent

        getTimestamp
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PropertySourceChangedEvent

        protected PropertySourceChangedEvent​(org.springframework.context.ApplicationContext source,
                                             PropertySourceChangedEvent.Kind kind,
                                             @Nullable
                                             org.springframework.core.env.PropertySource newPropertySource,
                                             @Nullable
                                             org.springframework.core.env.PropertySource oldPropertySource)
      • PropertySourceChangedEvent

        protected PropertySourceChangedEvent​(org.springframework.context.ApplicationContext source,
                                             PropertySourceChangedEvent.Kind kind,
                                             @Nullable
                                             org.springframework.core.env.PropertySource newPropertySource)
    • Method Detail

      • getNewPropertySource

        @Nullable
        public org.springframework.core.env.PropertySource getNewPropertySource()
        Returns:
        the new PropertySource
      • getOldPropertySource

        @Nullable
        public org.springframework.core.env.PropertySource getOldPropertySource()
        Returns:
        the old PropertySource
      • added

        public static PropertySourceChangedEvent added​(org.springframework.context.ApplicationContext source,
                                                       @NonNull
                                                       org.springframework.core.env.PropertySource newPropertySource)
        Create an added instance
        Parameters:
        source - ApplicationContext
        newPropertySource - the new PropertySource
        Returns:
        non-null
      • replaced

        public static PropertySourceChangedEvent replaced​(org.springframework.context.ApplicationContext source,
                                                          @NonNull
                                                          org.springframework.core.env.PropertySource newPropertySource,
                                                          @NonNull
                                                          org.springframework.core.env.PropertySource oldPropertySource)
        Create an replaced instance
        Parameters:
        source - ApplicationContext
        newPropertySource - the new PropertySource
        oldPropertySource - the old PropertySource
        Returns:
        non-null
      • removed

        public static PropertySourceChangedEvent removed​(org.springframework.context.ApplicationContext source,
                                                         @NonNull
                                                         org.springframework.core.env.PropertySource oldPropertySource)
        Create an removed instance
        Parameters:
        source - ApplicationContext
        oldPropertySource - the old PropertySource
        Returns:
        non-null