Interface WidgetController
- All Known Implementing Classes:
AbstractWidgetController
public interface WidgetController
Controller used by Cockpit Widget components.
A WidgetController typically acts as a conventional controller as well as a Publish-Subscribe-Channel used
for inter-widget communication. A widget controller is typically a Spring bean defined in the session scope.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCockpitEventAcceptor(String context, CockpitEventAcceptor acceptor) Registers the event acceptor acceptor so that it receives notifications when an event with the matching context context is dispatched.voidNotifies all event acceptors which are registered for events with the context code context.voidremoveCockpitEventAcceptor(String context, CockpitEventAcceptor acceptor) Unregisters the event acceptor acceptor for events with the specified context code context .voidsetCockpitEventAcceptors(Map<String, List<CockpitEventAcceptor>> acceptorMap) Sets the event acceptors to register with this controller.
-
Method Details
-
addCockpitEventAcceptor
Registers the event acceptor acceptor so that it receives notifications when an event with the matching context context is dispatched.- Parameters:
context- event contextacceptor- event acceptor
-
removeCockpitEventAcceptor
Unregisters the event acceptor acceptor for events with the specified context code context .- Parameters:
context- event contextacceptor- event acceptor
-
setCockpitEventAcceptors
Sets the event acceptors to register with this controller.- Parameters:
acceptorMap- acceptor map where the key is the controller context code and the value a list of acceptors
-
dispatchEvent
Notifies all event acceptors which are registered for events with the context code context.- Parameters:
context- event contextsource- event sourceparams- parameters to be be passed to registered listeners
-