|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.novanic.eventservice.service.registry.user.UserActivityScheduler
public class UserActivityScheduler
UserActivityScheduler observes the activities of the users/clients and can report timeouts.
To observe the users/clients, the UserActivityScheduler must be started with the start method
(start(boolean)).
| Constructor Summary | |
|---|---|
protected |
UserActivityScheduler(java.util.Collection<UserInfo> aUserInfoCollection,
long aTimeoutInterval)
Creates a new UserActivityScheduler with a reference to a Collection of UserInfo. |
| Method Summary | |
|---|---|
void |
addTimeoutListener(UserTimeoutListener aTimeoutListener)
Adds a UserTimeoutListener to the UserActivityScheduler. |
long |
getTimeoutInterval()
Returns the configured timeout time/interval. |
boolean |
isActive()
Returns the state of the UserActivityScheduler. |
void |
removeTimeoutListener(UserTimeoutListener aTimeoutListener)
Removes a UserTimeoutListener from the UserActivityScheduler. |
void |
removeTimeoutListeners()
Removes all UserTimeoutListener from the UserActivityScheduler. |
void |
reportUserActivity(UserInfo aUserInfo)
That method must be called to report a user activity and protects the user from a timeout for the time of the timeout interval ( EventServiceConfiguration.getTimeoutTime()). |
void |
start(boolean isAutoClean)
That method starts the UserActivityScheduler to observe the users/clients. |
void |
stop()
Stops the UserActivityScheduler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected UserActivityScheduler(java.util.Collection<UserInfo> aUserInfoCollection,
long aTimeoutInterval)
UserInfo.
aUserInfoCollection - all UserInfo instances to observeaTimeoutInterval - milliseconds to the timeout| Method Detail |
|---|
public void addTimeoutListener(UserTimeoutListener aTimeoutListener)
UserTimeoutListener to the UserActivityScheduler.
aTimeoutListener - listener to get reported timeoutspublic void removeTimeoutListener(UserTimeoutListener aTimeoutListener)
UserTimeoutListener from the UserActivityScheduler.
aTimeoutListener - listener to get reported timeoutspublic void removeTimeoutListeners()
UserTimeoutListener from the UserActivityScheduler.
public void start(boolean isAutoClean)
EventServiceConfiguration.getTimeoutTime()).
isAutoClean - when set to true, the users/clients are removed automatically on timeoutpublic void stop()
public boolean isActive()
start(boolean)) and false when the UserActivityScheduler isn't started or stopped
(stop()).
public long getTimeoutInterval()
public void reportUserActivity(UserInfo aUserInfo)
EventServiceConfiguration.getTimeoutTime()).
aUserInfo - user/client to refresh
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||