org.jboss.security.auth.login
Class XMLLoginConfig

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

public class XMLLoginConfig
extends ServiceMBeanSupport (src)
implements XMLLoginConfigMBean (src)

An MBean for managing a XMLLoginConfigImpl instance.


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
XMLLoginConfig()
           
 
Method Summary
 void addAppConfig(java.lang.String appName, javax.security.auth.login.AppConfigurationEntry[] entries)
          Add an application login configuration.
protected  void destroyService()
          Clear all configuration entries
 java.lang.String displayAppConfig(java.lang.String appName)
          Display the login configuration for the given application.
 javax.security.auth.login.Configuration getConfiguration(javax.security.auth.login.Configuration prevConfig)
          Get the XML based configuration given the Configuration it should delegate to when an application cannot be found.
 java.net.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
 java.lang.String[] loadConfig(java.net.URL configURL)
          Load the login configuration information from the given config URL.
 void removeAppConfig(java.lang.String appName)
          Remove an application login configuration.
 void removeConfigs(java.lang.String[] appNames)
          Remove the given login configurations.
 void setConfigResource(java.lang.String resourceName)
          Set the resource name of the XML login configuration file that should be loaded by this mbean on startup.
 void setConfigURL(java.net.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 (src)
create, createService, destroy, 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 (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)
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Constructor Detail

XMLLoginConfig

public XMLLoginConfig()
Method Detail

getConfigURL

public java.net.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 (src)

setConfigURL

public void setConfigURL(java.net.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 (src)

setConfigResource

public void setConfigResource(java.lang.String resourceName)
                       throws java.io.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 (src)
Throws:
java.io.IOException

getValidateDTD

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

Specified by:
getValidateDTD in interface XMLLoginConfigMBean (src)

setValidateDTD

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

Specified by:
setValidateDTD in interface XMLLoginConfigMBean (src)

getPassSecurityDomainName

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

setPassSecurityDomainName

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

addAppConfig

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

Specified by:
addAppConfig in interface XMLLoginConfigMBean (src)

removeAppConfig

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

Specified by:
removeAppConfig in interface XMLLoginConfigMBean (src)

getConfiguration

public javax.security.auth.login.Configuration getConfiguration(javax.security.auth.login.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 (src)

loadConfig

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

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

removeConfigs

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

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

displayAppConfig

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

Specified by:
displayAppConfig in interface XMLLoginConfigMBean (src)

startService

protected void startService()
                     throws java.lang.Exception
Load the configuration

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

destroyService

protected void destroyService()
Clear all configuration entries

Overrides:
destroyService in class ServiceMBeanSupport (src)