org.jboss.security.srp
Class SRPVerifierStoreService

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

public class SRPVerifierStoreService
extends ServiceMBeanSupport (src)
implements SRPVerifierStoreServiceMBean (src)

The JMX mbean interface for the SRP password verifier store. This implementation uses the SerialObjectStore as a simple and yet secure source of usernames and their password verifiers and verifier salts. It also provides a simple interface for adding and deleting users from the SerialObjectStore. The mbean stores a non-serializable reference to the SRPVerifierStore interface in JNDI under the property.

See Also:
SerialObjectStore (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
SRPVerifierStoreService()
           
 
Method Summary
 void addUser(java.lang.String username, java.lang.String password)
          Add a user to the store.
 void delUser(java.lang.String username)
          Delete a user to the store.
 java.lang.String getJndiName()
          Get the jndi name for the SRPVerifierSource implementation binding.
 java.lang.String getName()
          Use the short class name as the default for the service name.
 void initService()
           
 void setJndiName(java.lang.String jndiName)
          set the jndi name for the SRPVerifierSource implementation binding.
 void setStoreFile(java.lang.String fileName)
          Set the location of the user password verifier store
 void startService()
          Sub-classes should override this method to provide custum 'start' logic.
 
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, 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)
getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Constructor Detail

SRPVerifierStoreService

public SRPVerifierStoreService()
Method Detail

getJndiName

public java.lang.String getJndiName()
Get the jndi name for the SRPVerifierSource implementation binding.

Specified by:
getJndiName in interface SRPVerifierStoreServiceMBean (src)

setJndiName

public void setJndiName(java.lang.String jndiName)
set the jndi name for the SRPVerifierSource implementation binding.

Specified by:
setJndiName in interface SRPVerifierStoreServiceMBean (src)

setStoreFile

public void setStoreFile(java.lang.String fileName)
                  throws java.io.IOException
Description copied from interface: SRPVerifierStoreServiceMBean (src)
Set the location of the user password verifier store

Specified by:
setStoreFile in interface SRPVerifierStoreServiceMBean (src)
Throws:
java.io.IOException

addUser

public void addUser(java.lang.String username,
                    java.lang.String password)
             throws java.io.IOException
Description copied from interface: SRPVerifierStoreServiceMBean (src)
Add a user to the store.

Specified by:
addUser in interface SRPVerifierStoreServiceMBean (src)
Throws:
java.io.IOException

delUser

public void delUser(java.lang.String username)
             throws java.io.IOException
Description copied from interface: SRPVerifierStoreServiceMBean (src)
Delete a user to the store.

Specified by:
delUser in interface SRPVerifierStoreServiceMBean (src)
Throws:
java.io.IOException

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)

initService

public void initService()
                 throws java.lang.Exception
Throws:
java.lang.Exception

startService

public void startService()
                  throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' 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:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception