pl.mn.communicator
Interface ILoginService

All Known Implementing Classes:
DefaultLoginService

public interface ILoginService

The client should use this interface if it wants to log in to the Gadu-Gadu server.

Created on 2004-11-27

Version:
$Id: ILoginService.java,v 1.1 2005/11/05 23:34:52 winnetou25 Exp $
Author:
Mateusz Szczap

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 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.
 void removeLoginListener(LoginListener loginListener)
          Remove LoginListener instance from the list that will be notified of login related events.
 

Method Detail

login

void login(LoginContext loginContext)
           throws GGException
Invocation of this method tries to log in user to currently connected server.

The uin and password that is used in logging in process is retrieved from the LoginContext instance.

Throws:
GGException - if an error occurs while logging in.
GGSessionException - if there is an incorrect session state.

logout

void logout()
            throws GGException
Invocation of this method tries to log out user from the currently connected the server.

It sets user's status to inavailable.

Throws:
GGException - if error occurs while logging out.
GGSessionException - if there is an incorrect session state.

logout

void logout(java.lang.String description,
            java.util.Date returnTime)
            throws GGException
Invocation of this method tries to log out user from the currently connected server.

It sets user's status to inavailable with description. Note that returnTime can be null.

Parameters:
description - the description that will be set.
returnTime - the time the user will be back.
Throws:
GGException - if error occurs while logging out.
GGSessionException - if there is an incorrect session state.
java.lang.NullPointerException - if the description is null.

isLoggedIn

boolean isLoggedIn()

getLoginContext

LoginContext getLoginContext()

addLoginListener

void addLoginListener(LoginListener loginListener)
Adds LoginListener instance to the list that will be notified of login related events.

Parameters:
loginListener - the LoginListener instance to be notified.

removeLoginListener

void removeLoginListener(LoginListener loginListener)
Remove LoginListener instance from the list that will be notified of login related events.

Parameters:
loginListener - the LoginListener instance that will no longer be notified.


Copyright 2004-2004-2005 SourceForge.net. All Rights Reserved.