FileDocCategorySizeDatePackage
ConnectorResourceNamingEventNotifier.javaAPI DocGlassfish v2 API3519Fri May 04 22:34:24 BST 2007com.sun.enterprise.connectors

ConnectorResourceNamingEventNotifier

public class ConnectorResourceNamingEventNotifier extends Object implements ConnectorNamingEventNotifier
Notifier for connector resource naming events
author
Jagadish Ramu

Fields Summary
private ArrayList
listeners
private static ConnectorResourceNamingEventNotifier
notifier
Constructors Summary
private ConnectorResourceNamingEventNotifier()

        listeners= new ArrayList<ConnectorNamingEventListener>();
     
Methods Summary
public voidaddListener(ConnectorNamingEventListener listener)
To add Listener which gets notified when the event happens

param
listener

        listeners.add(listener);
    
public static synchronized ConnectorNamingEventNotifiergetInstance()
Returns an instance of event notifier (singleton)

return
ConnectorNamingEventNotifier

         if(notifier == null){
            notifier = new ConnectorResourceNamingEventNotifier();
         }
        return notifier;
     
public voidnotifyListeners(ConnectorNamingEvent event)
Notifies all the registered listeners about the naming event.

param
event


        for(ConnectorNamingEventListener listener : listeners){
            listener.connectorNamingEventPerformed(event);
        }
    
public voidremoveListener(ConnectorNamingEventListener listener)
To remove listener such that it wont be notified anymore.

param
listener

        listeners.remove(listener);