org.jboss.security.auth.login
Class DynamicLoginConfig

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.security.auth.login.DynamicLoginConfig
All Implemented Interfaces:
DynamicLoginConfigMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class DynamicLoginConfig
extends ServiceMBeanSupport (src)
implements DynamicLoginConfigMBean (src)

A security config mbean that loads an xml login configuration using the XMLLoginConfig.loadConfig(URL config) operation on start, and unloads the contained login module configurations on stop. login-config.xml jboss.security:service=XMLLoginConfig jboss.security:service=JaasSecurityManager

See Also:
XMLLoginConfig (src)

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
DynamicLoginConfig()
           
 
Method Summary
 void flushAuthenticationCaches()
          Go through the registered login config names and flush the auth caches if there is a registered SecurityManagerService.
 java.lang.String getAuthConfig()
          Get the resource path to the JAAS login configuration file to use.
 ObjectName (src) getLoginConfigService()
          Get the XMLLoginConfig service to use for loading.
 java.lang.String getName()
          Use the short class name as the default for the service name.
 ObjectName (src) getSecurityManagerService()
          Get the SecurityManagerService used to flush the registered security domains.
 void setAuthConfig(java.lang.String authConf)
          Set the resource path to the JAAS login configuration file to use.
 void setLoginConfigService(ObjectName (src)  serviceName)
          Get the XMLLoginConfig service to use for loading.
 void setSecurityManagerService(ObjectName (src)  serviceName)
          Set the SecurityManagerService used to flush the registered security domains.
protected  void startService()
          Start the service.
protected  void stopService()
          Start the service.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean (src)
getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Constructor Detail

DynamicLoginConfig

public DynamicLoginConfig()
Method Detail

getName

public java.lang.String getName()
Description copied from class: ServiceMBeanSupport (src)
Use the short class name as the default for the service name.

Specified by:
getName in interface ServiceMBean (src)
Overrides:
getName in class ServiceMBeanSupport (src)

getLoginConfigService

public ObjectName (src)  getLoginConfigService()
Description copied from interface: DynamicLoginConfigMBean (src)
Get the XMLLoginConfig service to use for loading.

Specified by:
getLoginConfigService in interface DynamicLoginConfigMBean (src)
Returns:
the XMLLoginConfig service name.

setLoginConfigService

public void setLoginConfigService(ObjectName (src)  serviceName)
Get the XMLLoginConfig service to use for loading. This service must support a String[] loadConfig(URL) operation to load the configurations.

Specified by:
setLoginConfigService in interface DynamicLoginConfigMBean (src)
Parameters:
serviceName - - the XMLLoginConfig service name.

getSecurityManagerService

public ObjectName (src)  getSecurityManagerService()
Description copied from interface: DynamicLoginConfigMBean (src)
Get the SecurityManagerService used to flush the registered security domains.

Specified by:
getSecurityManagerService in interface DynamicLoginConfigMBean (src)
Returns:
the SecurityManagerService service name.

setSecurityManagerService

public void setSecurityManagerService(ObjectName (src)  serviceName)
Set the SecurityManagerService used to flush the registered security domains. This service must support an flushAuthenticationCache(String) operation to flush the case for the argument security domain. Setting this triggers the flush of the authentication caches when the service is stopped.

Specified by:
setSecurityManagerService in interface DynamicLoginConfigMBean (src)
Parameters:
serviceName - - the SecurityManagerService service name.

getAuthConfig

public java.lang.String getAuthConfig()
Get the resource path to the JAAS login configuration file to use.

Specified by:
getAuthConfig in interface DynamicLoginConfigMBean (src)

setAuthConfig

public void setAuthConfig(java.lang.String authConf)
Set the resource path to the JAAS login configuration file to use. The default is "login-config.xml".

Specified by:
setAuthConfig in interface DynamicLoginConfigMBean (src)
Parameters:
authConf - - the classpath resource to load.

flushAuthenticationCaches

public void flushAuthenticationCaches()
                               throws java.lang.Exception
Go through the registered login config names and flush the auth caches if there is a registered SecurityManagerService.

Specified by:
flushAuthenticationCaches in interface DynamicLoginConfigMBean (src)
Throws:
java.lang.Exception

startService

protected void startService()
                     throws java.lang.Exception
Start the service. This entails loading the AuthConf file contents using the LoginConfigService.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Start the service. This entails unloading the AuthConf file contents using the LoginConfigService.

Overrides:
stopService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception