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 Details

    • addCockpitEventAcceptor

      void addCockpitEventAcceptor(String context, CockpitEventAcceptor acceptor)
      Registers the event acceptor acceptor so that it receives notifications when an event with the matching context context is dispatched.
      Parameters:
      context - event context
      acceptor - event acceptor
    • removeCockpitEventAcceptor

      void removeCockpitEventAcceptor(String context, CockpitEventAcceptor acceptor)
      Unregisters the event acceptor acceptor for events with the specified context code context .
      Parameters:
      context - event context
      acceptor - event acceptor
    • setCockpitEventAcceptors

      void setCockpitEventAcceptors(Map<String,List<CockpitEventAcceptor>> acceptorMap)
      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

      void dispatchEvent(String context, Object source, Map<String,Object> params)
      Notifies all event acceptors which are registered for events with the context code context.
      Parameters:
      context - event context
      source - event source
      params - parameters to be be passed to registered listeners