Class DialogMessageBus

java.lang.Object
org.eclnt.jsfserver.messages.DialogMessageBus

public class DialogMessageBus extends Object
Messaging within one dialog session. The messages are any objects that are published by publishMessage(Object) to listeners implementing IDialogMessageBusListener.

Used for informing different areas on the screen about events - without requiring a drill down of the events from the parent area to the child areas.
  • Method Details

    • instance

      public static DialogMessageBus instance()
    • instance

      public static DialogMessageBus instance(boolean createIfNotExists)
    • instance

      public static DialogMessageBus instance(javax.servlet.http.HttpSession httpSession, ISessionAbstraction dialogSession, boolean createIfNotExists)
    • addListener

      public void addListener(IDialogMessageBusListener listener)
    • removeListener

      public void removeListener(IDialogMessageBusListener listenerToRemove)
    • publishMessage

      public void publishMessage(Object message)
      Publish message within the current dialog session "only". The event is executed immediately.
    • publishMessageToAllClientDialogs

      public void publishMessageToAllClientDialogs(CrossDialogMessage message)
      Publish message within the current dialog session AND within other dialogs that belong to the same client. The event is executed immediately within the current dialog - and is executed asynchronously in the other dialogs.
    • getExplicitClusterClientId

      public String getExplicitClusterClientId()
      Explicit id that is checked if a cluster message is received for checking if a message is relevant for a receiver or not.
    • setExplicitClusterClientId

      public void setExplicitClusterClientId(String explicitClusterClientId)
    • destroy

      public void destroy()
    • processMessageQueue

      protected void processMessageQueue()
      This method is always called in the UI thread.
    • processClusterMessage

      protected void processClusterMessage(String topic, String message)