public class IlvDefaultMessageManager extends Object
IlvDefaultMessageManager
manages messages and
actions listeners.
This class is used in Java Standalone applications. It is responsible for dispatching all messages and actions to all listeners that have subscribed.
Modifier and Type | Field and Description |
---|---|
protected ilog.views.appframe.IlvAList |
msgListeners
Contains all the message listeners.
|
Constructor and Description |
---|
IlvDefaultMessageManager()
This constructor is protected because this class is a singleton and the
instance is created by the {#Get()} method.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessageListener(MessageListener listener,
String name)
Adds the object
listener to the list of objects that will
receive messages. |
void |
removeMessageListener(MessageListener listener)
Removes the object
listener from the list of listeners. |
void |
sendMessage(String targetName,
MessageEvent event)
Sends the specified event to the message listener registered with
the message manager with the specified name.
|
protected ilog.views.appframe.IlvAList msgListeners
public IlvDefaultMessageManager()
public void addMessageListener(MessageListener listener, String name)
listener
to the list of objects that will
receive messages.listener
- The object to add to the list of messages listeners.name
- The listener name.removeMessageListener(MessageListener)
public void removeMessageListener(MessageListener listener)
listener
from the list of listeners.listener
- The object to remove from the list of message
listeners.addMessageListener(MessageListener, String)
public void sendMessage(String targetName, MessageEvent event)
targetName
- The name associated with the listener to be notified.
This is the same name as used when registering the
listener with the message manager using the method addMessageListener(ilog.views.appframe.event.MessageListener, java.lang.String)
.
null
, the message will be sent to all the listeners
that are registered with the message manager.event
- The message event sent to all the listeners registered with
the message manager.addMessageListener(ilog.views.appframe.event.MessageListener, java.lang.String)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.