de.novanic.eventservice.service.registry.user
Class UserManagerFactory

java.lang.Object
  extended by de.novanic.eventservice.service.registry.user.UserManagerFactory

public class UserManagerFactory
extends java.lang.Object

The UserManagerFactory is used to create the UserManager and to ensure that only one instance of UserManagerFactory and UserManager exists (singleton).

Author:
sstrohschein
Date: 01.02.2009
Time: 18:17:58
See Also:
UserManagerFactory

Method Summary
static UserManagerFactory getInstance()
          This method should be used to create an instance of UserManagerFactory.
 UserManager getUserManager()
          Returns the UserManager as a singleton.
 UserManager getUserManager(EventServiceConfiguration aConfiguration)
          Returns the UserManager as a singleton.
 UserManager getUserManager(long aTimeoutInterval)
          Returns the UserManager as a singleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UserManagerFactory getInstance()
This method should be used to create an instance of UserManagerFactory. UserManagerFactory is a singleton, so this method returns always the same instance of UserManagerFactory.

Returns:
UserManagerFactory (singleton)

getUserManager

public UserManager getUserManager()
Returns the UserManager as a singleton. It is important that the UserManager must be initiated first. That can be done by creating a UserManager with a configuration: getUserManager(de.novanic.eventservice.config.EventServiceConfiguration) or getUserManager(long). When the UserManager isn't initiated the method throws a ConfigurationException.

Returns:
UserManager (singleton)
Throws:
ConfigurationException - thrown when the UserManager isn't initiated first with getUserManager(de.novanic.eventservice.config.EventServiceConfiguration) or getUserManager(long)

getUserManager

public UserManager getUserManager(EventServiceConfiguration aConfiguration)
Returns the UserManager as a singleton.

Parameters:
aConfiguration - EventServiceConfiguration used to read the timeout time/interval.
Returns:
UserManager (singleton)

getUserManager

public UserManager getUserManager(long aTimeoutInterval)
Returns the UserManager as a singleton.

Parameters:
aTimeoutInterval - timeout interval (is only required if the UserActivityScheduler needs to be started).
Returns:
UserManager (singleton)