Example usage for javax.security.auth.message.config RegistrationListener RegistrationListener

List of usage examples for javax.security.auth.message.config RegistrationListener RegistrationListener

Introduction

In this page you can find the example usage for javax.security.auth.message.config RegistrationListener RegistrationListener.

Prototype

RegistrationListener

Source Link

Usage

From source file:org.jboss.test.security.container.auth.AuthConfigFactoryTestCase.java

public void testRegistrationListener() throws Exception {
    RegistrationListener rl = new RegistrationListener() {
        public void notify(String layer, String appContext) {
        }//from   w w  w  .  j  ava  2  s.  c  om
    };

    String layer = SecurityConstants.SERVLET_LAYER;
    //Register an AuthConfigProvider for all appcontext in a layer
    factory.registerConfigProvider(allACProvider, new HashMap(), layer, null, "This is a test provider");
    AuthConfigProvider acp = factory.getConfigProvider(layer, "testAppContext", rl);
    String[] ids = factory.getRegistrationIDs(acp);
    String[] detachedIds = factory.detachListener(rl, layer, "testAppContext");
    checkStringArrayEquals(ids, detachedIds);
}