public class GlobalStatusServiceImpl extends java.lang.Object implements GlobalStatusService, RegistrationStateChangeListener
Constructor and Description |
---|
GlobalStatusServiceImpl() |
Modifier and Type | Method and Description |
---|---|
PresenceStatus |
getGlobalPresenceStatus()
Returns the global presence status.
|
PresenceStatus |
getLastPresenceStatus(ProtocolProviderService protocolProvider)
Returns the last status that was stored in the configuration for the
given protocol provider.
|
java.lang.String |
getLastStatusString(ProtocolProviderService protocolProvider)
Returns the last contact status saved in the configuration.
|
(package private) void |
handleProviderAdded(ProtocolProviderService pps)
Handles newly added providers.
|
(package private) void |
handleProviderRemoved(ProtocolProviderService pps)
Handles removed providers.
|
void |
publishStatus(GlobalStatusEnum globalStatus)
Publish present status.
|
void |
publishStatus(ProtocolProviderService protocolProvider,
PresenceStatus status)
Publish present status.
|
void |
registrationStateChanged(RegistrationStateChangeEvent evt)
Waits for providers to register and then checks for its last status
saved if any and used it to restore its status.
|
void handleProviderAdded(ProtocolProviderService pps)
pps
- void handleProviderRemoved(ProtocolProviderService pps)
pps
- the provider.public PresenceStatus getGlobalPresenceStatus()
getGlobalPresenceStatus
in interface GlobalStatusService
public PresenceStatus getLastPresenceStatus(ProtocolProviderService protocolProvider)
getLastPresenceStatus
in interface GlobalStatusService
protocolProvider
- the protocol providerpublic java.lang.String getLastStatusString(ProtocolProviderService protocolProvider)
getLastStatusString
in interface GlobalStatusService
protocolProvider
- the protocol provider to which the status
correspondspublic void publishStatus(ProtocolProviderService protocolProvider, PresenceStatus status)
publishStatus
in interface GlobalStatusService
protocolProvider
- the protocol provider to which we
change the status.status
- the status to publish.public void publishStatus(GlobalStatusEnum globalStatus)
publishStatus
in interface GlobalStatusService
globalStatus
- public void registrationStateChanged(RegistrationStateChangeEvent evt)
registrationStateChanged
in interface RegistrationStateChangeListener
evt
- a RegistrationStateChangeEvent which describes the
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.