org.jboss.security.auth.login
Class XMLLoginConfig

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.security.auth.login.XMLLoginConfig
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, XMLLoginConfigMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class XMLLoginConfig
extends org.jboss.system.ServiceMBeanSupport
implements XMLLoginConfigMBean

An MBean for managing a XMLLoginConfigImpl instance.

Version:
$Revision: 57203 $
Author:
Scott.Stark@jboss.org

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
XMLLoginConfig()
           
 
Method Summary
 void addAppConfig(String appName, AppConfigurationEntry[] entries)
          Add an application login configuration.
protected  void destroyService()
          Clear all configuration entries
 String displayAppConfig(String appName)
          Display the login configuration for the given application.
 Configuration getConfiguration(Configuration prevConfig)
          Get the XML based configuration given the Configuration it should delegate to when an application cannot be found.
 URL getConfigURL()
          Set the URL of the XML login configuration file that should be loaded by this mbean on startup.
 boolean getPassSecurityDomainName()
           
 boolean getValidateDTD()
          Get whether the login config xml document is validated againsts its DTD
 String[] loadConfig(URL configURL)
          Load the login configuration information from the given config URL.
 void removeAppConfig(String appName)
          Remove an application login configuration.
 void removeConfigs(String[] appNames)
          Remove the given login configurations.
 void setConfigResource(String resourceName)
          Set the resource name of the XML login configuration file that should be loaded by this mbean on startup.
 void setConfigURL(URL configURL)
          Set the URL of the XML login configuration file that should be loaded by this mbean on startup.
 void setPassSecurityDomainName(boolean flag)
           
 void setValidateDTD(boolean flag)
          Set whether the login config xml document is validated againsts its DTD
protected  void startService()
          Load the configuration
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, 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
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

XMLLoginConfig

public XMLLoginConfig()
Method Detail

getConfigURL

public URL getConfigURL()
Set the URL of the XML login configuration file that should be loaded by this mbean on startup.

Specified by:
getConfigURL in interface XMLLoginConfigMBean

setConfigURL

public void setConfigURL(URL configURL)
Set the URL of the XML login configuration file that should be loaded by this mbean on startup.

Specified by:
setConfigURL in interface XMLLoginConfigMBean

setConfigResource

public void setConfigResource(String resourceName)
                       throws IOException
Set the resource name of the XML login configuration file that should be loaded by this mbean on startup.

Specified by:
setConfigResource in interface XMLLoginConfigMBean
Throws:
IOException

getValidateDTD

public boolean getValidateDTD()
Get whether the login config xml document is validated againsts its DTD

Specified by:
getValidateDTD in interface XMLLoginConfigMBean

setValidateDTD

public void setValidateDTD(boolean flag)
Set whether the login config xml document is validated againsts its DTD

Specified by:
setValidateDTD in interface XMLLoginConfigMBean

getPassSecurityDomainName

public boolean getPassSecurityDomainName()
Specified by:
getPassSecurityDomainName in interface XMLLoginConfigMBean

setPassSecurityDomainName

public void setPassSecurityDomainName(boolean flag)
Specified by:
setPassSecurityDomainName in interface XMLLoginConfigMBean

addAppConfig

public void addAppConfig(String appName,
                         AppConfigurationEntry[] entries)
Add an application login configuration. Any existing configuration for the given appName will be replaced.

Specified by:
addAppConfig in interface XMLLoginConfigMBean

removeAppConfig

public void removeAppConfig(String appName)
Remove an application login configuration.

Specified by:
removeAppConfig in interface XMLLoginConfigMBean

getConfiguration

public Configuration getConfiguration(Configuration prevConfig)
Get the XML based configuration given the Configuration it should delegate to when an application cannot be found.

Specified by:
getConfiguration in interface XMLLoginConfigMBean

loadConfig

public String[] loadConfig(URL configURL)
                    throws Exception
Load the login configuration information from the given config URL.

Specified by:
loadConfig in interface XMLLoginConfigMBean
Parameters:
configURL - A URL to an XML or Sun login config file.
Returns:
An array of the application config names loaded
Throws:
Exception - on failure to load the configuration

removeConfigs

public void removeConfigs(String[] appNames)
Description copied from interface: XMLLoginConfigMBean
Remove the given login configurations. This invokes removeAppConfig for each element of appNames.

Specified by:
removeConfigs in interface XMLLoginConfigMBean
Parameters:
appNames - the names of the login configurations to remove.

displayAppConfig

public String displayAppConfig(String appName)
Display the login configuration for the given application.

Specified by:
displayAppConfig in interface XMLLoginConfigMBean

startService

protected void startService()
                     throws Exception
Load the configuration

Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

destroyService

protected void destroyService()
Clear all configuration entries

Overrides:
destroyService in class org.jboss.system.ServiceMBeanSupport


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.