|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.mn.communicator.DefaultPresenceService
public class DefaultPresenceService
The implementation of IPresenceService.
Created on 2004-11-28
| Constructor Summary | |
|---|---|
DefaultPresenceService(Session session)
|
|
| Method Summary | |
|---|---|
void |
addMonitoredUser(IUser user)
Adds the user to be monitored. |
void |
addUserListener(UserListener userListener)
Adds UserListener to the list of listeners
that will be notified of status related events. |
void |
changeMonitoredUserStatus(IUser user)
Changes status of the currently monitored user. |
java.util.Collection |
getMonitoredUsers()
Returns collections of the users that are currently being monitored. |
ILocalStatus |
getStatus()
Returns the actual status of the user that is logged in. |
protected void |
notifyLocalUserChangedStatus(ILocalStatus localStatus)
|
protected void |
notifyUserChangedStatus(IUser user,
IRemoteStatus newStatus)
|
void |
removeMonitoredUser(IUser user)
Remove the user that was previously being monitored. |
void |
removeUserListener(UserListener userListener)
Removes UserListener from the list of listeners that will
be notified of status related events. |
void |
setStatus(ILocalStatus localStatus)
Invocation of this method tries to set a new status of the user that is currently logged in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
DefaultPresenceService(Session session)
| Method Detail |
|---|
public void setStatus(ILocalStatus localStatus)
throws GGException
IPresenceService
setStatus in interface IPresenceServicelocalStatus - the new status to be set.
GGException - if there is an error while setting status.
GGSessionException - if user is not logged in.IPresenceService.setStatus(pl.mn.communicator.ILocalStatus)public ILocalStatus getStatus()
IPresenceService
getStatus in interface IPresenceServiceIPresenceService.getStatus()
public void addMonitoredUser(IUser user)
throws GGException
IPresenceService
After adding the user UserListener's will
receive events related to changing status of the user.
Note that you can also block the user using this method. After blocking the user you will no longer receive any messages from him/her.
addMonitoredUser in interface IPresenceServiceuser - that will be monitored or blocked.
GGException - if there is an error while adding user to be monitored.
GGSessionException - if we are currently not logged in to the Gadu-Gadu server.IPresenceService.addMonitoredUser(pl.mn.communicator.IUser)
public void removeMonitoredUser(IUser user)
throws GGException
IPresenceService
removeMonitoredUser in interface IPresenceServiceuser - that we want to unregister from being monitored.
GGException - if there is an error while removing user from being monitored or if the user is not being monitored.
GGSessionException - if we are currently not logged in to the Gadu-Gadu serverIPresenceService.removeMonitoredUser(pl.mn.communicator.IUser)
public void changeMonitoredUserStatus(IUser user)
throws GGException
IPresenceService
changeMonitoredUserStatus in interface IPresenceServiceuser - that contains a new status to be changed.
GGException - if there is an error while changing status of the user or if the user is not being monitored.
GGSessionException - if we are currently not logged in to the Gadu-Gadu server.IPresenceService.changeMonitoredUserStatus(pl.mn.communicator.IUser)public java.util.Collection getMonitoredUsers()
IPresenceService
getMonitoredUsers in interface IPresenceServiceIPresenceService.getMonitoredUsers()public void addUserListener(UserListener userListener)
IPresenceServiceUserListener to the list of listeners
that will be notified of status related events.
addUserListener in interface IPresenceServiceuserListener - the UserListener object that will be notified.IPresenceService.addUserListener(pl.mn.communicator.event.UserListener)public void removeUserListener(UserListener userListener)
IPresenceServiceUserListener from the list of listeners that will
be notified of status related events.
removeUserListener in interface IPresenceServiceuserListener - the UserListener object that will no longer be notified.IPresenceService.removeUserListener(pl.mn.communicator.event.UserListener)
protected void notifyUserChangedStatus(IUser user,
IRemoteStatus newStatus)
throws GGException
GGException
protected void notifyLocalUserChangedStatus(ILocalStatus localStatus)
throws GGException
GGException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||