Class PropertySourceChangedEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.springframework.context.ApplicationEvent
-
- org.springframework.context.event.ApplicationContextEvent
-
- io.microsphere.spring.config.env.event.PropertySourceChangedEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class PropertySourceChangedEvent extends org.springframework.context.event.ApplicationContextEvent
The event raised when one singlePropertySource
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 ofPropertySource
Changed Event
-
Constructor Summary
Constructors Modifier Constructor Description protected
PropertySourceChangedEvent(org.springframework.context.ApplicationContext source, PropertySourceChangedEvent.Kind kind, org.springframework.core.env.PropertySource newPropertySource)
protected
PropertySourceChangedEvent(org.springframework.context.ApplicationContext source, PropertySourceChangedEvent.Kind kind, org.springframework.core.env.PropertySource newPropertySource, org.springframework.core.env.PropertySource oldPropertySource)
-
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 anadded
instancePropertySourceChangedEvent.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 anremoved
instancestatic PropertySourceChangedEvent
replaced(org.springframework.context.ApplicationContext source, org.springframework.core.env.PropertySource newPropertySource, org.springframework.core.env.PropertySource oldPropertySource)
Create anreplaced
instance
-
-
-
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
-
getKind
public PropertySourceChangedEvent.Kind getKind()
- Returns:
- the Kind of
PropertySource
Changed Event
-
added
public static PropertySourceChangedEvent added(org.springframework.context.ApplicationContext source, @NonNull org.springframework.core.env.PropertySource newPropertySource)
Create anadded
instance- Parameters:
source
-ApplicationContext
newPropertySource
- the newPropertySource
- 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 anreplaced
instance- Parameters:
source
-ApplicationContext
newPropertySource
- the newPropertySource
oldPropertySource
- the oldPropertySource
- Returns:
- non-null
-
removed
public static PropertySourceChangedEvent removed(org.springframework.context.ApplicationContext source, @NonNull org.springframework.core.env.PropertySource oldPropertySource)
Create anremoved
instance- Parameters:
source
-ApplicationContext
oldPropertySource
- the oldPropertySource
- Returns:
- non-null
-
-