Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.gems.client
Class GemEventMulticaster

java.lang.Object
  extended by org.openquark.gems.client.GemEventMulticaster
All Implemented Interfaces:
EventListener, BurnListener, CodeGemDefinitionChangeListener, GemConnectionListener, NameChangeListener

public class GemEventMulticaster
extends Object
implements BurnListener, GemConnectionListener, CodeGemDefinitionChangeListener, NameChangeListener

A multicaster class, modeled after AWTEventMulticaster, that provides a way to manage listeners on various gem events. It is quite efficient for relatively short lists of listeners. Creation date: (02/25/02 12:10:00 PM)

Author:
Edward Lam
See Also:
AWTEventMulticaster

Field Summary
protected  EventListener a
           
protected  EventListener b
           
 
Constructor Summary
protected GemEventMulticaster(EventListener a, EventListener b)
          Default constructor for a gem event multicaster Creation date: (02/25/02 12:10:00 PM)
 
Method Summary
static BurnListener add(BurnListener a, BurnListener b)
          Adds burn-listener-a with burn-listener-b and returns the resulting multicast listener.
static CodeGemDefinitionChangeListener add(CodeGemDefinitionChangeListener a, CodeGemDefinitionChangeListener b)
          Adds code change listener-a with code change listener-b and returns the resulting multicast listener.
static org.openquark.gems.client.DisplayedConnectionStateListener add(org.openquark.gems.client.DisplayedConnectionStateListener a, org.openquark.gems.client.DisplayedConnectionStateListener b)
          Adds gem state listener-a with gem state listener-b and returns the resulting multicast listener.
static org.openquark.gems.client.DisplayedGemLocationListener add(org.openquark.gems.client.DisplayedGemLocationListener a, org.openquark.gems.client.DisplayedGemLocationListener b)
          Adds location change listener-a with location change listener-b and returns the resulting multicast listener.
static org.openquark.gems.client.DisplayedGemSizeListener add(org.openquark.gems.client.DisplayedGemSizeListener a, org.openquark.gems.client.DisplayedGemSizeListener b)
          Adds size change listener-a with size change listener-b and returns the resulting multicast listener.
static org.openquark.gems.client.DisplayedGemStateListener add(org.openquark.gems.client.DisplayedGemStateListener a, org.openquark.gems.client.DisplayedGemStateListener b)
          Adds state change listener-a with state change listener-b and returns the resulting multicast listener.
static GemConnectionListener add(GemConnectionListener a, GemConnectionListener b)
          Adds gem connection change listener-a with gem connection change listener-b and returns the resulting multicast listener.
static org.openquark.gems.client.GemStateListener add(org.openquark.gems.client.GemStateListener a, org.openquark.gems.client.GemStateListener b)
          Adds state change listener-a with state change listener-b and returns the resulting multicast listener.
static NameChangeListener add(NameChangeListener a, NameChangeListener b)
          Adds name change listener-a with name change listener-b and returns the resulting multicast listener.
protected static EventListener addInternal(EventListener a, EventListener b)
          Returns the resulting multicast listener from adding listener-a and listener-b together.
 void badStateChanged(DisplayedConnectionStateEvent e)
          Notify listeners that the run state changed.
 void brokenStateChanged(GemStateEvent e)
          Notify listeners that the broken state changed.
 void burntStateChanged(BurnEvent e)
          Handles the inputBurntStateChanged event by invoking the inputBurntStateChanged methods on listener-a and listener-b.
 void codeGemDefinitionChanged(CodeGemDefinitionChangeEvent e)
          Notify the listener that the gem definition has been changed.
 void connectionOccurred(GemConnectionEvent e)
          Notify listeners that a connection event occurred Creation date: (02/26/02 4:00:00 PM)
 void disconnectionOccurred(GemConnectionEvent e)
          Notify listeners that a connection event occurred Creation date: (02/26/02 4:00:00 PM)
 void gemLocationChanged(DisplayedGemLocationEvent e)
          Notify listeners that the gem location changed.
 void gemSizeChanged(DisplayedGemSizeEvent e)
          Notify listeners that the gem size changed.
 void nameChanged(NameChangeEvent e)
          Notify listeners that the gem name changed.
static BurnListener remove(BurnListener l, BurnListener oldl)
          Removes the old burn-listener from burn-listener-l and returns the resulting multicast listener.
static CodeGemDefinitionChangeListener remove(CodeGemDefinitionChangeListener l, CodeGemDefinitionChangeListener oldl)
          Removes the old code change listener from code change listener-l and returns the resulting multicast listener.
static org.openquark.gems.client.DisplayedConnectionStateListener remove(org.openquark.gems.client.DisplayedConnectionStateListener l, org.openquark.gems.client.DisplayedConnectionStateListener oldl)
          Removes the old gem state listener from gem state listener-l and returns the resulting multicast listener.
static org.openquark.gems.client.DisplayedGemLocationListener remove(org.openquark.gems.client.DisplayedGemLocationListener l, org.openquark.gems.client.DisplayedGemLocationListener oldl)
          Removes the old location change listener from location change listener-l and returns the resulting multicast listener.
static org.openquark.gems.client.DisplayedGemSizeListener remove(org.openquark.gems.client.DisplayedGemSizeListener l, org.openquark.gems.client.DisplayedGemSizeListener oldl)
          Removes the old size change listener from size change listener-l and returns the resulting multicast listener.
static org.openquark.gems.client.DisplayedGemStateListener remove(org.openquark.gems.client.DisplayedGemStateListener l, org.openquark.gems.client.DisplayedGemStateListener oldl)
          Removes the old state change listener from state change listener-l and returns the resulting multicast listener.
protected  EventListener remove(EventListener oldl)
          Removes a listener from this multicaster and returns the resulting multicast listener.
static GemConnectionListener remove(GemConnectionListener l, GemConnectionListener oldl)
          Removes the old gem connection change listener from gem connection change listener-l and returns the resulting multicast listener.
static org.openquark.gems.client.GemStateListener remove(org.openquark.gems.client.GemStateListener l, org.openquark.gems.client.GemStateListener oldl)
          Removes the old state change listener from state change listener-l and returns the resulting multicast listener.
static NameChangeListener remove(NameChangeListener l, NameChangeListener oldl)
          Removes the old name change listener from name change listener-l and returns the resulting multicast listener.
protected static EventListener removeInternal(EventListener l, EventListener oldl)
          Returns the resulting multicast listener after removing the old listener from listener-l.
 void runStateChanged(DisplayedGemStateEvent e)
          Notify listeners that the run state changed.
 void selectionStateChanged(DisplayedGemStateEvent e)
          Notify listeners that the selection state changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

protected final EventListener a

b

protected final EventListener b
Constructor Detail

GemEventMulticaster

protected GemEventMulticaster(EventListener a,
                              EventListener b)
Default constructor for a gem event multicaster Creation date: (02/25/02 12:10:00 PM)

Method Detail

addInternal

protected static EventListener addInternal(EventListener a,
                                           EventListener b)
Returns the resulting multicast listener from adding listener-a and listener-b together. If listener-a is null, it returns listener-b; If listener-b is null, it returns listener-a If neither are null, then it creates and returns a new AWTEventMulticaster instance which chains a with b.

Parameters:
a - event listener-a
b - event listener-b

removeInternal

protected static EventListener removeInternal(EventListener l,
                                              EventListener oldl)
Returns the resulting multicast listener after removing the old listener from listener-l. If listener-l equals the old listener OR listener-l is null, returns null. Else if listener-l is an instance of AWTEventMulticaster, then it removes the old listener from it. Else, returns listener l. Creation date: (02/25/02 12:15:00 PM)

Parameters:
l - the listener being removed from
oldl - the listener being removed

remove

protected EventListener remove(EventListener oldl)
Removes a listener from this multicaster and returns the resulting multicast listener.

Parameters:
oldl - the listener to be removed

add

public static BurnListener add(BurnListener a,
                               BurnListener b)
Adds burn-listener-a with burn-listener-b and returns the resulting multicast listener. Creation date: (02/25/02 4:52:00 PM)

Parameters:
a - burn-listener-a
b - burn-listener-b

remove

public static BurnListener remove(BurnListener l,
                                  BurnListener oldl)
Removes the old burn-listener from burn-listener-l and returns the resulting multicast listener. Creation date: (02/25/02 4:52:00 PM)

Parameters:
l - burn-listener-l
oldl - the burn-listener being removed

add

public static NameChangeListener add(NameChangeListener a,
                                     NameChangeListener b)
Adds name change listener-a with name change listener-b and returns the resulting multicast listener. Creation date: (02/28/02 5:26:00 PM)

Parameters:
a - name change listener-a
b - name change listener-b

remove

public static NameChangeListener remove(NameChangeListener l,
                                        NameChangeListener oldl)
Removes the old name change listener from name change listener-l and returns the resulting multicast listener. Creation date: (02/28/02 5:28:00 PM)

Parameters:
l - name change listener-l
oldl - the name change listener being removed

add

public static org.openquark.gems.client.GemStateListener add(org.openquark.gems.client.GemStateListener a,
                                                             org.openquark.gems.client.GemStateListener b)
Adds state change listener-a with state change listener-b and returns the resulting multicast listener. Creation date: (02/26/02 12:22:00 PM)

Parameters:
a - state change listener-a
b - state change listener-b

remove

public static org.openquark.gems.client.GemStateListener remove(org.openquark.gems.client.GemStateListener l,
                                                                org.openquark.gems.client.GemStateListener oldl)
Removes the old state change listener from state change listener-l and returns the resulting multicast listener. Creation date: (02/26/02 12:23:00 PM)

Parameters:
l - state change listener-l
oldl - the state change listener being removed

add

public static CodeGemDefinitionChangeListener add(CodeGemDefinitionChangeListener a,
                                                  CodeGemDefinitionChangeListener b)
Adds code change listener-a with code change listener-b and returns the resulting multicast listener. Creation date: (02/26/02 1:31:00 PM)

Parameters:
a - code change listener-a
b - code change listener-b

remove

public static CodeGemDefinitionChangeListener remove(CodeGemDefinitionChangeListener l,
                                                     CodeGemDefinitionChangeListener oldl)
Removes the old code change listener from code change listener-l and returns the resulting multicast listener. Creation date: (02/26/02 1:31:00 PM)

Parameters:
l - code change listener-l
oldl - the code change listener being removed

add

public static GemConnectionListener add(GemConnectionListener a,
                                        GemConnectionListener b)
Adds gem connection change listener-a with gem connection change listener-b and returns the resulting multicast listener. Creation date: (02/26/02 4:09:00 PM)

Parameters:
a - gem connection change listener-a
b - gem connection change listener-b

remove

public static GemConnectionListener remove(GemConnectionListener l,
                                           GemConnectionListener oldl)
Removes the old gem connection change listener from gem connection change listener-l and returns the resulting multicast listener. Creation date: (02/26/02 4:11:00 PM)

Parameters:
l - gem connection change listener-l
oldl - the gem connection change listener being removed

add

public static org.openquark.gems.client.DisplayedConnectionStateListener add(org.openquark.gems.client.DisplayedConnectionStateListener a,
                                                                             org.openquark.gems.client.DisplayedConnectionStateListener b)
Adds gem state listener-a with gem state listener-b and returns the resulting multicast listener. Creation date: (03/04/02 4:20:00 PM)

Parameters:
a - gem state listener-a
b - gem state listener-b

remove

public static org.openquark.gems.client.DisplayedConnectionStateListener remove(org.openquark.gems.client.DisplayedConnectionStateListener l,
                                                                                org.openquark.gems.client.DisplayedConnectionStateListener oldl)
Removes the old gem state listener from gem state listener-l and returns the resulting multicast listener. Creation date: (03/04/02 4:21:00 PM)

Parameters:
l - gem state listener-l
oldl - the gem state listener being removed

add

public static org.openquark.gems.client.DisplayedGemLocationListener add(org.openquark.gems.client.DisplayedGemLocationListener a,
                                                                         org.openquark.gems.client.DisplayedGemLocationListener b)
Adds location change listener-a with location change listener-b and returns the resulting multicast listener. Creation date: (02/27/02 5:25:00 PM)

Parameters:
a - location change listener-a
b - location change listener-b

remove

public static org.openquark.gems.client.DisplayedGemLocationListener remove(org.openquark.gems.client.DisplayedGemLocationListener l,
                                                                            org.openquark.gems.client.DisplayedGemLocationListener oldl)
Removes the old location change listener from location change listener-l and returns the resulting multicast listener. Creation date: (02/27/02 5:28:00 AM)

Parameters:
l - location change listener-l
oldl - the location change listener being removed

add

public static org.openquark.gems.client.DisplayedGemSizeListener add(org.openquark.gems.client.DisplayedGemSizeListener a,
                                                                     org.openquark.gems.client.DisplayedGemSizeListener b)
Adds size change listener-a with size change listener-b and returns the resulting multicast listener. Creation date: (02/28/02 5:11:00 PM)

Parameters:
a - size change listener-a
b - size change listener-b

remove

public static org.openquark.gems.client.DisplayedGemSizeListener remove(org.openquark.gems.client.DisplayedGemSizeListener l,
                                                                        org.openquark.gems.client.DisplayedGemSizeListener oldl)
Removes the old size change listener from size change listener-l and returns the resulting multicast listener. Creation date: (02/28/02 5:11:00 AM)

Parameters:
l - size change listener-l
oldl - the size change listener being removed

add

public static org.openquark.gems.client.DisplayedGemStateListener add(org.openquark.gems.client.DisplayedGemStateListener a,
                                                                      org.openquark.gems.client.DisplayedGemStateListener b)
Adds state change listener-a with state change listener-b and returns the resulting multicast listener. Creation date: (02/26/02 11:18:00 AM)

Parameters:
a - state change listener-a
b - state change listener-b

remove

public static org.openquark.gems.client.DisplayedGemStateListener remove(org.openquark.gems.client.DisplayedGemStateListener l,
                                                                         org.openquark.gems.client.DisplayedGemStateListener oldl)
Removes the old state change listener from state change listener-l and returns the resulting multicast listener. Creation date: (02/26/02 11:18:00 AM)

Parameters:
l - state change listener-l
oldl - the state change listener being removed

badStateChanged

public void badStateChanged(DisplayedConnectionStateEvent e)
Notify listeners that the run state changed. Creation date: (03/04/02 4:08:00 PM)

Parameters:
e - ConnectionStateEvent the related event.

gemLocationChanged

public void gemLocationChanged(DisplayedGemLocationEvent e)
Notify listeners that the gem location changed. Creation date: (03/04/02 3:35:00 PM)

Parameters:
e - DisplayedGemLocationEvent the related event.

gemSizeChanged

public void gemSizeChanged(DisplayedGemSizeEvent e)
Notify listeners that the gem size changed. Creation date: (03/04/02 3:35:00 PM)

Parameters:
e - DisplayedGemSizeEvent the related event.

burntStateChanged

public void burntStateChanged(BurnEvent e)
Handles the inputBurntStateChanged event by invoking the inputBurntStateChanged methods on listener-a and listener-b. Creation date: (02/25/02 4:57:00 PM)

Specified by:
burntStateChanged in interface BurnListener
Parameters:
e - the burn event

runStateChanged

public void runStateChanged(DisplayedGemStateEvent e)
Notify listeners that the run state changed. Creation date: (02/26/02 10:50:00 AM)

Parameters:
e - GemStateEvent the related event.

selectionStateChanged

public void selectionStateChanged(DisplayedGemStateEvent e)
Notify listeners that the selection state changed. Creation date: (02/26/02 10:50:00 AM)

Parameters:
e - GemStateEvent the related event.

brokenStateChanged

public void brokenStateChanged(GemStateEvent e)
Notify listeners that the broken state changed. Creation date: (02/26/02 12:19:00 PM)

Parameters:
e - GemStateEvent the related event.

codeGemDefinitionChanged

public void codeGemDefinitionChanged(CodeGemDefinitionChangeEvent e)
Notify the listener that the gem definition has been changed. Creation date: (02/26/02 1:34:00 PM)

Specified by:
codeGemDefinitionChanged in interface CodeGemDefinitionChangeListener
Parameters:
e - CodeGemDefinitionEditEvent the related event.

connectionOccurred

public void connectionOccurred(GemConnectionEvent e)
Notify listeners that a connection event occurred Creation date: (02/26/02 4:00:00 PM)

Specified by:
connectionOccurred in interface GemConnectionListener
Parameters:
e - GemConnectionEvent the related event.

disconnectionOccurred

public void disconnectionOccurred(GemConnectionEvent e)
Notify listeners that a connection event occurred Creation date: (02/26/02 4:00:00 PM)

Specified by:
disconnectionOccurred in interface GemConnectionListener
Parameters:
e - GemConnectionEvent the related event.

nameChanged

public void nameChanged(NameChangeEvent e)
Notify listeners that the gem name changed. Creation date: (03/04/02 3:38:00 PM)

Specified by:
nameChanged in interface NameChangeListener
Parameters:
e - NameChangeEvent the related event.

Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.