org.apache.wsrp4j.consumer.driver
Class GenericUserRegistryImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.GenericUserRegistryImpl
All Implemented Interfaces:
UserRegistry

public class GenericUserRegistryImpl
extends java.lang.Object
implements UserRegistry


Constructor Summary
GenericUserRegistryImpl()
           
 
Method Summary
 User addUser(User user)
          Add a user.
 java.util.Iterator getAllUsers()
          Get an iterator with all known users
 User getUser(java.lang.String userID)
          Get the user with the given id
 void removeAllUsers()
          Remove all users from the registry
 User removeUser(java.lang.String userID)
          Remove a user from the list of known user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericUserRegistryImpl

public GenericUserRegistryImpl()
Method Detail

getUser

public User getUser(java.lang.String userID)
Get the user with the given id

Specified by:
getUser in interface UserRegistry
Parameters:
userID - The ID of the user
Returns:
The user

removeUser

public User removeUser(java.lang.String userID)
Remove a user from the list of known user

Specified by:
removeUser in interface UserRegistry
Parameters:
userID - The ID of the user
Returns:
The user which has been removed or null

addUser

public User addUser(User user)
Add a user. If a record with the given userid already exists, the input UserContext object is returned, otherwise a null value.

Specified by:
addUser in interface UserRegistry
Parameters:
user - The user object to add
Returns:
Null on success or the input user object in case a user with the same user id already exists.

getAllUsers

public java.util.Iterator getAllUsers()
Get an iterator with all known users

Specified by:
getAllUsers in interface UserRegistry
Returns:
All known user contexts in an iterator

removeAllUsers

public void removeAllUsers()
Description copied from interface: UserRegistry
Remove all users from the registry

Specified by:
removeAllUsers in interface UserRegistry