FileDocCategorySizeDatePackage
ListenerManager.javaAPI DocGlassfish v2 API3210Fri May 04 22:24:40 BST 2007com.sun.enterprise.admin.wsmgmt.agent

ListenerManager

public class ListenerManager extends Object
This class interacts with JAX RPC Monitoring SPI and registers Global Listener to get callbacks.

Fields Summary
private static ListenerManager
lm
Constructors Summary
private ListenerManager()


      
Methods Summary
public static synchronized com.sun.enterprise.admin.wsmgmt.agent.ListenerManagergetInstance()

        if ( lm == null) {
            lm = new ListenerManager();
        }
        return lm;
    
public voidregister()
Registers the Global Listener.

        WebServiceEngine wsEng =
        WebServiceEngineFactory.getInstance().getEngine();

        GlobalMessageListener gml = new GlobalMessageListenerImpl();
        AuthenticationListener al = new AuthenticationListenerImpl();
        wsEng.setGlobalMessageListener(gml);
        wsEng.addAuthListener(al);

        if (wsEng.getGlobalMessageListener() == null) {
            throw new RuntimeException("Message Listener could not be set");
        }