Package io.jmix.aichat.component.chat
Class GenerationStateChangeEvent<T extends AiChatMessage>
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<AiChat<T>>
io.jmix.aichat.component.chat.GenerationStateChangeEvent<T>
- Type Parameters:
T- the application's message type
- All Implemented Interfaces:
Serializable
public class GenerationStateChangeEvent<T extends AiChatMessage>
extends com.vaadin.flow.component.ComponentEvent<AiChat<T>>
Fired on every
GenerationState transition.- See Also:
-
Field Summary
FieldsFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionGenerationStateChangeEvent(AiChat<T> source, GenerationState oldState, GenerationState newState) Creates the event. -
Method Summary
Modifier and TypeMethodDescriptionGets the new state.Gets the previous state.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, getUI, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Field Details
-
oldState
-
newState
-
-
Constructor Details
-
GenerationStateChangeEvent
public GenerationStateChangeEvent(AiChat<T> source, GenerationState oldState, GenerationState newState) Creates the event.- Parameters:
source- the chatoldState- the previous statenewState- the new state
-
-
Method Details
-
getOldState
Gets the previous state.- Returns:
- the previous state
-
getNewState
Gets the new state.- Returns:
- the new state
-