ilog.views.appframe
Class IlvDefaultMessageManager

java.lang.Object
  extended by ilog.views.appframe.IlvDefaultMessageManager

public class IlvDefaultMessageManager
extends Object

The class 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.


Field Summary
protected  ilog.views.appframe.IlvAList msgListeners
          Contains all the message listeners.
 
Constructor Summary
IlvDefaultMessageManager()
          This constructor is protected because this class is a singleton and the instance is created by the {#Get()} method.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

msgListeners

protected ilog.views.appframe.IlvAList msgListeners
Contains all the message listeners.

See Also:
addMessageListener(MessageListener, String), removeMessageListener(MessageListener)
Constructor Detail

IlvDefaultMessageManager

public IlvDefaultMessageManager()
This constructor is protected because this class is a singleton and the instance is created by the {#Get()} method.

Method Detail

addMessageListener

public void addMessageListener(MessageListener listener,
                               String name)
Adds the object listener to the list of objects that will receive messages.

Parameters:
listener - The object to add to the list of messages listeners.
name - The listener name.
See Also:
removeMessageListener(MessageListener)

removeMessageListener

public void removeMessageListener(MessageListener listener)
Removes the object listener from the list of listeners.

Parameters:
listener - The object to remove from the list of message listeners.
See Also:
addMessageListener(MessageListener, String)

sendMessage

public void sendMessage(String targetName,
                        MessageEvent event)
Sends the specified event to the message listener registered with the message manager with the specified name.

Parameters:
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).
If this parameter is 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.
See Also:
addMessageListener(ilog.views.appframe.event.MessageListener, java.lang.String)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.