Package org.onosproject.net.intent
Class IntentEvent
- java.lang.Object
- 
- org.onosproject.event.AbstractEvent<IntentEvent.Type,Intent>
- 
- org.onosproject.net.intent.IntentEvent
 
 
- 
- All Implemented Interfaces:
- Event<IntentEvent.Type,Intent>
 
 @Beta public class IntentEvent extends AbstractEvent<IntentEvent.Type,Intent> A class to represent an intent related event.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classIntentEvent.Type
 - 
Constructor SummaryConstructors Constructor Description IntentEvent(IntentEvent.Type type, Intent intent)Creates an event of a given type and for the specified intent and the current time.IntentEvent(IntentEvent.Type type, Intent intent, long time)Creates an event of a given type and for the specified intent and the current time.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<IntentEvent>getEvent(IntentData data)Creates an IntentEvent based on the state contained in the given intent data.static Optional<IntentEvent>getEvent(IntentState state, Intent intent)Creates an IntentEvent based on the given state and intent.- 
Methods inherited from class org.onosproject.event.AbstractEventsubject, time, toString, type
 
- 
 
- 
- 
- 
Constructor Detail- 
IntentEventpublic IntentEvent(IntentEvent.Type type, Intent intent, long time) Creates an event of a given type and for the specified intent and the current time.- Parameters:
- type- event type
- intent- subject intent
- time- time the event created in milliseconds since start of epoch
 
 - 
IntentEventpublic IntentEvent(IntentEvent.Type type, Intent intent) Creates an event of a given type and for the specified intent and the current time.- Parameters:
- type- event type
- intent- subject intent
 
 
- 
 - 
Method Detail- 
getEventpublic static Optional<IntentEvent> getEvent(IntentData data) Creates an IntentEvent based on the state contained in the given intent data. Some states are not sent as external events, and these states will return null events.- Parameters:
- data- the intent data to create an event for
- Returns:
- new intent event if the state is valid, otherwise null.
 
 - 
getEventpublic static Optional<IntentEvent> getEvent(IntentState state, Intent intent) Creates an IntentEvent based on the given state and intent. Some states are not sent as external events, and these states will return null events.- Parameters:
- state- new state of the intent
- intent- intent to put in event
- Returns:
- new intent event if the state is valid, otherwise null.
 
 
- 
 
-