org.exolab.jms.authentication
Class AuthenticationMgr

java.lang.Object
  |
  +--org.exolab.core.service.Service
        |
        +--org.exolab.core.service.BasicService
              |
              +--org.exolab.jms.authentication.AuthenticationMgr
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable, org.exolab.core.service.Serviceable

public class AuthenticationMgr
extends org.exolab.core.service.BasicService

This is the active authentication component within the JMS server.

Version:
$Revision: 1.3 $ $Date: 2003/08/07 13:32:48 $
Author:
Knut Lerpold
See Also:
Serialized Form

Method Summary
 boolean addUser(User user)
          Create a user.
static AuthenticationMgr createInstance()
          Create and return an instance of the singleton.
 User getUser(User user)
          Gets a user.
static AuthenticationMgr instance()
          Return an instance to the AuthenticationMgr singleton.
 boolean removeUser(User user)
          Remove this user
 void run()
           
 void stop()
           
 boolean updateUser(User user)
          Update a user.
 boolean validateUser(java.lang.String username, java.lang.String password)
          Validate the password for the specified user.
 
Methods inherited from class org.exolab.core.service.BasicService
start, toString
 
Methods inherited from class org.exolab.core.service.Service
getName, getState, restart, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createInstance

public static AuthenticationMgr createInstance()
                                        throws org.exolab.core.service.ServiceException
Create and return an instance of the singleton.
Returns:
the singleton instance
Throws:
org.exolab.core.service.ServiceException - if the service cannot be created

instance

public static AuthenticationMgr instance()
Return an instance to the AuthenticationMgr singleton. This method assumes that the singleton has already been created with a call to createInstance()
Returns:
the singleton instance

run

public void run()
Overrides:
run in class org.exolab.core.service.BasicService

stop

public void stop()
          throws org.exolab.core.service.ServiceException
Overrides:
stop in class org.exolab.core.service.BasicService

addUser

public boolean addUser(User user)
Create a user.
Parameters:
user - the user to create
Returns:
true if the user is created otherwise false

removeUser

public boolean removeUser(User user)
Remove this user
Parameters:
user - the user to remove
Returns:
true if the user is removed otherwise false

getUser

public User getUser(User user)
Gets a user.
Parameters:
user - the user
Returns:
User

updateUser

public boolean updateUser(User user)
Update a user.
Parameters:
user - the user to update
Returns:
true if the password is updated otherwise false

validateUser

public boolean validateUser(java.lang.String username,
                            java.lang.String password)
Validate the password for the specified user.
Parameters:
username - the user's name
password - the password to check
Returns:
true if the username and password exist, otherwise false


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.