Package org.onosproject.net.config
Class NetworkConfigEvent
- java.lang.Object
 - 
- org.onosproject.event.AbstractEvent<NetworkConfigEvent.Type,Object>
 - 
- org.onosproject.net.config.NetworkConfigEvent
 
 
 
- 
- All Implemented Interfaces:
 Event<NetworkConfigEvent.Type,Object>
public class NetworkConfigEvent extends AbstractEvent<NetworkConfigEvent.Type,Object>
Describes network configuration event. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNetworkConfigEvent.TypeType of network configuration events. 
- 
Constructor Summary
Constructors Constructor Description NetworkConfigEvent(NetworkConfigEvent.Type type, Object subject, Class configClass)Creates an event of a given type and for the specified subject and the current time.NetworkConfigEvent(NetworkConfigEvent.Type type, Object subject, Class configClass, long time)Creates an event of a given type and for the specified subject and time.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. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Config>config()Returns current config.ClassconfigClass()Returns the class of configuration that has been changed.Optional<Config>prevConfig()Returns previous config.StringtoString()- 
Methods inherited from class org.onosproject.event.AbstractEvent
subject, time, type 
 - 
 
 - 
 
- 
- 
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 typesubject- event subjectconfigClass- 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 typesubject- event subjectconfigClass- configuration classtime- 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 typesubject- event subjectconfigClass- configuration classconfig- current configprevConfig- 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
 
 
- 
toString
public String toString()
- Overrides:
 toStringin classAbstractEvent<NetworkConfigEvent.Type,Object>
 
 - 
 
 -