Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.sysactivity
Interface SystemActivityNotificationsService

All Known Implementing Classes:
SystemActivityNotificationsServiceImpl

public interface SystemActivityNotificationsService

Listens for some system specific events such as sleep, wake, network change, desktop activity, screensaver etc. and informs the registered listeners.

Author:
Damian Minkov

Method Summary
 void addIdleSystemChangeListener(long idleTime, SystemActivityChangeListener listener)
          Registers a listener that would be notified for idle of the system for idleTime.
 void addSystemActivityChangeListener(SystemActivityChangeListener listener)
          Registers a listener that would be notified of changes that have occurred in the underlying system.
 boolean isSupported(int eventID)
          Can check whether an event id is supported on current operation system.
 void removeIdleSystemChangeListener(SystemActivityChangeListener listener)
          Remove the specified listener so that it won't receive further notifications for idle system.
 void removeSystemActivityChangeListener(SystemActivityChangeListener listener)
          Remove the specified listener so that it won't receive further notifications of changes that occur in the underlying system
 

Method Detail

addSystemActivityChangeListener

void addSystemActivityChangeListener(SystemActivityChangeListener listener)
Registers a listener that would be notified of changes that have occurred in the underlying system.

Parameters:
listener - the listener that we'd like to register for changes in the underlying system.

removeSystemActivityChangeListener

void removeSystemActivityChangeListener(SystemActivityChangeListener listener)
Remove the specified listener so that it won't receive further notifications of changes that occur in the underlying system

Parameters:
listener - the listener to remove.

addIdleSystemChangeListener

void addIdleSystemChangeListener(long idleTime,
                                 SystemActivityChangeListener listener)
Registers a listener that would be notified for idle of the system for idleTime.

Parameters:
idleTime - the time in milliseconds after which we will consider system to be idle. This doesn't count when system seems idle as monitor is off or screensaver is on, or desktop is locked.
listener - the listener that we'd like to register for changes in the underlying system.

removeIdleSystemChangeListener

void removeIdleSystemChangeListener(SystemActivityChangeListener listener)
Remove the specified listener so that it won't receive further notifications for idle system.

Parameters:
listener - the listener to remove.

isSupported

boolean isSupported(int eventID)
Can check whether an event id is supported on current operation system.

Parameters:
eventID - the event to check.
Returns:
whether the supplied event id is supported.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.