|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectuserDatabase.UserDatabaseController
public class UserDatabaseController
Controller class of component UserDatabase
. Implements the
architecture interface UserDatabaseInterface
.
Used to store user-specific data (e. g. identifiers, session keys and buffers).
Constructor Summary | |
---|---|
UserDatabaseController()
Generates a new UserDatabase component. |
Method Summary | |
---|---|
void |
addUser(User user)
Adds the bypassed User to the internal database. |
java.util.Collection<User> |
getActiveUsers()
Returns all User s that are currently active. |
int |
getSize()
Returns the number of User s currently stored in the
internal database. |
User |
getUser(int identifier)
Returns the User with the bypassed identifier. |
User |
getUserByNextMixIdentifier(int nextMixIdentifier)
Returns the User with the bypassed identifier. |
void |
initialize()
Initializes the this component. |
boolean |
isExistingUser(int identifier)
Returns whether a User with the bypassed identifier is
present in the internal database or not. |
void |
removeUser(int identifier)
Removes the User with the bypassed identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserDatabaseController()
UserDatabase
component.
Used to store user-specific data (e. g. identifiers, session keys and buffers).
Method Detail |
---|
public void initialize()
public void addUser(User user) throws UserAlreadyExistingException
User
to the internal database.
addUser
in interface UserDatabaseInterface
user
- The User
to be added.
UserAlreadyExistingException
- Thrown when the bypassed
User
has already been added
(user's identifier already in use).public int getSize()
User
s currently stored in the
internal database.
getSize
in interface UserDatabaseInterface
User
s currently stored in the internal
database.public User getUser(int identifier) throws UnknownUserException
User
with the bypassed identifier.
getUser
in interface UserDatabaseInterface
identifier
- Identifier of the User
to be returned.
User
with the bypassed identifier.
UnknownUserException
- Thrown when no User
with
the bypassed identifier is existent.public boolean isExistingUser(int identifier)
User
with the bypassed identifier is
present in the internal database or not.
isExistingUser
in interface UserDatabaseInterface
identifier
- Identifier to search for.
User
present or not.public void removeUser(int identifier) throws UnknownUserException
User
with the bypassed identifier.
removeUser
in interface UserDatabaseInterface
identifier
- Identifier of the User
to be removed
from the internal database.
UnknownUserException
- Thrown when no User
with
the bypassed identifier is existent.public User getUserByNextMixIdentifier(int nextMixIdentifier) throws UnknownUserException
User
with the bypassed identifier.
getUserByNextMixIdentifier
in interface UserDatabaseInterface
nextMixIdentifier
- Identifier of the User
to be
returned.
User
with the bypassed identifier.
UnknownUserException
- Thrown when no User
with
the bypassed identifier is existent.public java.util.Collection<User> getActiveUsers()
User
s that are currently active.
getActiveUsers
in interface UserDatabaseInterface
User
s currently active.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |