org.jboss.security.jce
Class JCEProviderService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.security.jce.JCEProviderService
All Implemented Interfaces:
JCEProviderServiceMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class JCEProviderService
extends ServiceMBeanSupport (src)
implements JCEProviderServiceMBean (src)

The JCEProviderService is capable of loading one or more third party JCE providers at runtime. The configuration looks something like:

  <mbean code="org.jboss.security.jce.JCEProviderService"
     name="Security:service=JCEProviderService">
     <attribute name="JceProviders">
        <providers>
           <provider class="org.bouncycastle.jce.provider.BouncyCastleProvider" position="3"/>
           <provider class="cryptix.provider.Cryptix"/>
        </providers>
     </attribute>
  </mbean>
 
The required class attribute is the class name of the Provider to load. The optional position attribute is the position in the provider list that this provider would like to be loaded.

Any provider that already exists in the provider list will not be loaded again, and it will not be removed from the list when the JCEProviderService is destroyed.


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
JCEProviderService()
           
 
Method Summary
protected  void createService()
          Sub-classes should override this method to provide custum 'create' logic.
protected  void destroyService()
          Sub-classes should override this method to provide custum 'destroy' logic.
 org.w3c.dom.Element getJceProviders()
           
 void setJceProviders(org.w3c.dom.Element element)
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, startService, 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

JCEProviderService

public JCEProviderService()
Method Detail

setJceProviders

public void setJceProviders(org.w3c.dom.Element element)
Specified by:
setJceProviders in interface JCEProviderServiceMBean (src)

getJceProviders

public org.w3c.dom.Element getJceProviders()
Specified by:
getJceProviders in interface JCEProviderServiceMBean (src)

createService

protected void createService()
                      throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'create' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

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

destroyService

protected void destroyService()
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'destroy' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
destroyService in class ServiceMBeanSupport (src)