Package dyntabs
Class ApplicationCDIEvent
java.lang.Object
dyntabs.ApplicationCDIEvent
Event object used for inter-tab (application module) communication.
Tabs in DynTabs can send messages to each other using this event.
Each tab is identified by its uniqueIdentifier, which serves as
the sender/target address. The event carries an optional payload object
that can be any application-specific data.
Events are dispatched by DynTabManager.fireApplicationEvent(ApplicationCDIEvent)
which iterates through all active tabs and delivers the event directly
(bypassing CDI @Observes due to @TabScoped limitations).
Special event types:
"JobFlowReturn"- signals that a child tab is returning a value to its caller tab (workflow completion pattern)
- Author:
- DynTabs
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationCDIEvent(String senderAppModuleId, String targetAppModuleId, Object payload) Creates an event without an explicit event type.ApplicationCDIEvent(String eventType, String senderAppModuleId, String targetAppModuleId, Object payload) Creates an event with an explicit event type. -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
ApplicationCDIEvent
Creates an event without an explicit event type.- Parameters:
senderAppModuleId- uniqueIdentifier of the tab that fires the eventtargetAppModuleId- uniqueIdentifier of the tab that should receive the event (null to broadcast to all tabs)payload- arbitrary data object to send with the event
-
ApplicationCDIEvent
public ApplicationCDIEvent(String eventType, String senderAppModuleId, String targetAppModuleId, Object payload) Creates an event with an explicit event type.- Parameters:
eventType- the type of event (e.g. "JobFlowReturn")senderAppModuleId- uniqueIdentifier of the tab that fires the eventtargetAppModuleId- uniqueIdentifier of the tab that should receive the event (null to broadcast to all tabs)payload- arbitrary data object to send with the event
-
-
Method Details
-
getSenderAppModuleId
-
getTargetAppModuleId
-
getPayload
-
getEventType
-