|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.mn.communicator.DefaultLoginService
public class DefaultLoginService
The default implementation of ILoginService.
Created on 2004-11-28
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface pl.mn.communicator.event.UserListener |
|---|
UserListener.Stub |
| Constructor Summary | |
|---|---|
DefaultLoginService(Session session)
|
|
| Method Summary | |
|---|---|
void |
addLoginListener(LoginListener loginListener)
Adds LoginListener instance to the list that
will be notified of login related events. |
LoginContext |
getLoginContext()
|
boolean |
isLoggedIn()
|
void |
localStatusChanged(ILocalStatus localStatus)
|
void |
login(LoginContext loginContext)
Invocation of this method tries to log in user to currently connected server. |
void |
logout()
Invocation of this method tries to log out user from the currently connected the server. |
void |
logout(java.lang.String description,
java.util.Date returnTime)
Invocation of this method tries to log out user from the currently connected server. |
protected void |
notifyLoggedOut()
|
protected void |
notifyLoginFailed(LoginFailedEvent loginFailedEvent)
|
protected void |
notifyLoginOK()
|
void |
removeLoginListener(LoginListener loginListener)
Remove LoginListener instance from the list that
will be notified of login related events. |
void |
userStatusChanged(IUser user,
IRemoteStatus newStatus)
The notification that the user changed the status. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
DefaultLoginService(Session session)
| Method Detail |
|---|
public void login(LoginContext loginContext)
throws GGException
ILoginService
The uin and password that is used in logging in process
is retrieved from the LoginContext instance.
login in interface ILoginServiceGGException - if an error occurs while logging in.
GGSessionException - if there is an incorrect session state.pl.mn.communicator.ILoginService#login()
public void logout()
throws GGException
ILoginServiceIt sets user's status to inavailable.
logout in interface ILoginServiceGGException - if error occurs while logging out.
GGSessionException - if there is an incorrect session state.ILoginService.logout()
public void logout(java.lang.String description,
java.util.Date returnTime)
throws GGException
ILoginServiceIt sets user's status to inavailable with description. Note that returnTime can be null.
logout in interface ILoginServicedescription - the description that will be set.returnTime - the time the user will be back.
GGException - if error occurs while logging out.
GGSessionException - if there is an incorrect session state.ILoginService.logout(java.lang.String, java.util.Date returnTime)public LoginContext getLoginContext()
getLoginContext in interface ILoginServiceILoginService.getLoginContext()public boolean isLoggedIn()
isLoggedIn in interface ILoginServiceILoginService.isLoggedIn()public void addLoginListener(LoginListener loginListener)
ILoginServiceLoginListener instance to the list that
will be notified of login related events.
addLoginListener in interface ILoginServiceloginListener - the LoginListener instance to be notified.ILoginService.addLoginListener(pl.mn.communicator.event.LoginListener)public void removeLoginListener(LoginListener loginListener)
ILoginServiceLoginListener instance from the list that
will be notified of login related events.
removeLoginListener in interface ILoginServiceloginListener - the LoginListener instance that will no longer be notified.ILoginService.removeLoginListener(pl.mn.communicator.event.LoginListener)
protected void notifyLoginOK()
throws GGException
GGException
protected void notifyLoginFailed(LoginFailedEvent loginFailedEvent)
throws GGException
GGException
protected void notifyLoggedOut()
throws GGException
GGException
public void localStatusChanged(ILocalStatus localStatus)
throws GGException
localStatusChanged in interface UserListenerGGExceptionUserListener.localStatusChanged(pl.mn.communicator.ILocalStatus)
public void userStatusChanged(IUser user,
IRemoteStatus newStatus)
throws GGException
UserListener
userStatusChanged in interface UserListeneruser - the Gadu-Gadu user that changed the status.newStatus - the new status of the user.
GGExceptionUserListener.userStatusChanged(pl.mn.communicator.IUser, pl.mn.communicator.IRemoteStatus)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||