public class LoginManager extends java.lang.Object implements org.osgi.framework.ServiceListener, RegistrationStateChangeListener, AccountManagerListener
The LoginManager is the one that opens one or more LoginWindows for each ProtocolProviderFactory. The LoginWindow is where user could enter an identifier and password.
Note that the behavior of this class will be changed when the Configuration Service is ready.
Constructor and Description |
---|
LoginManager(LoginRenderer loginRenderer)
Creates an instance of the LoginManager, by specifying the main
application window.
|
Modifier and Type | Method and Description |
---|---|
void |
handleAccountManagerEvent(AccountManagerEvent event)
Notifies that the loading of the stored accounts of a
specific
ProtocolProviderFactory has finished. |
boolean |
isManuallyDisconnected()
Returns true to indicate the jitsi has been manually
disconnected, false - otherwise.
|
void |
login(ProtocolProviderService protocolProvider)
Registers the given protocol provider.
|
static void |
logoff(ProtocolProviderService protocolProvider)
Unregisters the given protocol provider.
|
void |
registrationStateChanged(RegistrationStateChangeEvent evt)
The method is called by a ProtocolProvider implementation whenever a
change in the registration state of the corresponding provider had
occurred.
|
void |
runLogin()
Shows login window for each registered account.
|
void |
serviceChanged(org.osgi.framework.ServiceEvent event)
Implements the ServiceListener method.
|
void |
setManuallyDisconnected(boolean manuallyDisconnected)
Sets the manually disconnected property.
|
public LoginManager(LoginRenderer loginRenderer)
loginRenderer
- the main application windowpublic void login(ProtocolProviderService protocolProvider)
protocolProvider
- the ProtocolProviderService to register.public static void logoff(ProtocolProviderService protocolProvider)
protocolProvider
- the ProtocolProviderService to unregisterpublic void runLogin()
public void handleAccountManagerEvent(AccountManagerEvent event)
ProtocolProviderFactory
has finished.handleAccountManagerEvent
in interface AccountManagerListener
event
- the AccountManagerEvent
describing the
AccountManager
firing the notification and the
other details of the specific notification.public void registrationStateChanged(RegistrationStateChangeEvent evt)
registrationStateChanged
in interface RegistrationStateChangeListener
evt
- ProviderStatusChangeEvent the event describing the status
change.public void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged
in interface org.osgi.framework.ServiceListener
event
- The ServiceEvent object.public boolean isManuallyDisconnected()
public void setManuallyDisconnected(boolean manuallyDisconnected)
manuallyDisconnected
- true to indicate the jitsi has been
manually disconnected, false - otherwise
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.