Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jboss.security.plugins
Class SecurityConfig  view SecurityConfig download SecurityConfig.java

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.security.plugins.SecurityConfig
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, SecurityConfigMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class SecurityConfig
extends org.jboss.system.ServiceMBeanSupport
implements SecurityConfigMBean

The SecurityConfigMBean implementation. This class needs the javax.security.auth.AuthPermission("setLoginConfiguration") to install the javax.security.auth.login.Configuration when running with a security manager.

Version:
$Revision: 1.4.4.1 $

Nested Class Summary
(package private) static class SecurityConfig.ConfigInfo
           
 
Field Summary
private  java.lang.String loginConfigName
          The default Configuration mbean name
private  java.util.Stack loginConfigStack
          The stack of Configuration mbeans that are active
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, serviceName
 
Fields inherited from class javax.management.NotificationBroadcasterSupport
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, STARTED, STARTING, states, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
SecurityConfig()
           
 
Method Summary
 java.lang.String getLoginConfig()
          Get the name of the mbean that provides the default JAAS login configuration
 java.lang.String getName()
          Use the short class name as the default for the service name.
private  SecurityConfig.ConfigInfo installConfig(javax.management.ObjectName name, javax.security.auth.login.Configuration prevConfig)
          Obtain the Configuration from the named mbean using its getConfiguration operation and install it as the current Configuration.
 void popLoginConfig()
          Pop the current mbean from the login configuration stack and install the previous Configuration as the current instance.
 void pushLoginConfig(java.lang.String objectName)
          Push an mbean onto the login configuration stack and install its Configuration as the current instance.
 void setLoginConfig(java.lang.String name)
          Set the name of the mbean that provides the default JAAS login configuration
 void startService()
          Start the configuration service by pushing the mbean given by the LoginConfig onto the configuration stack.
 void stopService()
          Start the configuration service by poping the top of the configuration stack.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getListenerMap, getNotificationInfo, 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
getState, getStateString
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

loginConfigName

private java.lang.String loginConfigName
The default Configuration mbean name


loginConfigStack

private java.util.Stack loginConfigStack
The stack of Configuration mbeans that are active

Constructor Detail

SecurityConfig

public SecurityConfig()
Method Detail

getName

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

Specified by:
getName in interface org.jboss.system.ServiceMBean

getLoginConfig

public java.lang.String getLoginConfig()
Get the name of the mbean that provides the default JAAS login configuration

Specified by:
getLoginConfig in interface SecurityConfigMBean

setLoginConfig

public void setLoginConfig(java.lang.String name)
                    throws javax.management.MalformedObjectNameException
Set the name of the mbean that provides the default JAAS login configuration

Specified by:
setLoginConfig in interface SecurityConfigMBean

startService

public void startService()
                  throws java.lang.Exception
Start the configuration service by pushing the mbean given by the LoginConfig onto the configuration stack.


stopService

public void stopService()
                 throws java.lang.Exception
Start the configuration service by poping the top of the configuration stack.


pushLoginConfig

public void pushLoginConfig(java.lang.String objectName)
                     throws javax.management.JMException,
                            javax.management.MalformedObjectNameException
Push an mbean onto the login configuration stack and install its Configuration as the current instance.

Specified by:
pushLoginConfig in interface SecurityConfigMBean

popLoginConfig

public void popLoginConfig()
                    throws javax.management.JMException
Pop the current mbean from the login configuration stack and install the previous Configuration as the current instance.

Specified by:
popLoginConfig in interface SecurityConfigMBean

installConfig

private SecurityConfig.ConfigInfo installConfig(javax.management.ObjectName name,
                                                javax.security.auth.login.Configuration prevConfig)
                                         throws javax.management.JMException
Obtain the Configuration from the named mbean using its getConfiguration operation and install it as the current Configuration.